Search code examples
javascriptfirefox-developer-tools

Is it possible to skip a line of code when debugging javascript in Firefox?


Say I set a break-point on a line of code in Firefox devtools/Debugger and refresh the webpage to stop at that line. Can I skip the execution of that line and jump directly to the next line?


Solution

  • No, it's currently not possible (as of Firefox 101) to skip lines when debugging.

    What you may do is manipulate the code while you're debugging. E.g. you can reset the value of a variable when it gets a new value assigned while the execution is stopped at a breakpoint. Or when the next statement is a function call, you can replace that function by an empty one. Of course, it is not always possible to turn a statement into a no-op. And doing so may have side effects.