Programmatically stop JavaScript execution in Firebug

后端 未结 1 804
误落风尘
误落风尘 2020-12-07 22:34

I am currently debugging complex JavaScript code with Firebug. I am looking for a way to stop the JavaScript execution as if it was a breakpoint programmatically.

Ex

相关标签:
1条回答
  • 2020-12-07 22:52

    You can use the debugger statement:

    // your JS code
    ...
    // break here
    debugger;
    

    It works in all major browsers.

    0 讨论(0)
提交回复
热议问题