Leetcode’s Online Code Debugger

  • 时间:2020-09-15 16:10:27
  • 分类:网络文摘
  • 阅读:90 次

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) —

推荐阅读:
诗词名句鉴赏:嘤其鸣矣,求其有声。  数学题:化肥厂计划用15天生产化肥4500吨  数学题:学校把两捆树苗分给三个年级种植  数学题:甲乙丙三人的平均年龄为22岁  数学题:在一块边长60m的正方形花坛四边种冬青树  数学题:用一根铁丝刚好焊成一个棱长10厘米的正方体框架  数学题:一艘船在静水中每小时行驶40千米  数学题:在AB两点之间等距离安装路灯  数学题:一种商品随季节出售  数学题:一个底面半径是6厘米的圆柱形玻璃器皿里装有一部分水 
评论列表
添加评论