Leetcode’s Online Code Debugger

  • Time:2020-09-15 16:10:27
  • Class:Weblog
  • Read:29

Leetcode online judge has introduced a new feature lately – which is the online code debugger. This works perfect for me as I am using iPad + bluetooth keyboard to solve the puzzles and all I really need is an lightweight code debugger.

leetcode-debugger Leetcode's Online Code Debugger debug leetcode online judge

leetcode-debugger

Advantages of the Online Code Debugger

Really, everything you need to solve a coding task is in the browser. For easy and medium questions, most of the time, you probably don’t need a debugger, and you could just “Run Code” with different test cases to debug your code. However, for difficult questions, a sophisticated debugger is often necessary.

On ipad, there isn’t any Good IDE that provides the debugger. And the leetcode code debugger just fills the gap. I can easily set a breakpoint, add variables to watch list, and see the local variables.

To use the leetcode debugger, you would need to:

  • Click the Console
  • Specifiy a Test Case
  • Set a break-point by clicking at least a line. You could set multiple lines after debugger starts up.
  • Click the Debug button
  • The code execution will stop at the first breakpoint and the variables/watch list will be updated accordingly.
  • You can Continue, Step Into a function, Step Over a function, or Step out a function.

The debugger is online, meaning that when you step into/over/out, you will notice a delay when the browser is communicating with the server. There isn’t any shortcuts (e.g. F8 or F9) so you can only click the button(s) to debug.

It isn’t perfect, but it makes the leetcode online judge standing out from the rest of the crowds.

–EOF (The Ultimate Computing & Technology Blog) —

Recommend:
Algorithms to Count How Many Numbers Are Smaller Than the Curren
Finding the Closest Divisors
Greedy Solution to Reconstruct a 2-Row Binary Matrix
How to Use jOOQ Library to Write SQL in Java using Fluent Style?
Algorithm to Compute the Number of Days Between Two Dates
How to Sort Integers by The Number of 1 Bits?
Using Depth First Search Algorithm to Delete Tree Nodes with Sum
Web Strategies to Start Your SEO Journey
How to Compute the Product of Last K elements in Array using the
How to Write a High-Quality Blog Post in Just 30 Minutes
Share:Facebook Twitter
Comment list
Comment add