I'm trying to debug some javascript in IE 11 and I'm not able to force it to stop on a breakpoint.
debugger;
line works fine (stops debugger in that line), same file without a debugger;
line but with a breakpoint set in the same place does nothing (function works fine, but debugger does not stop on a breakpoint).
Chrome's and Firefox's debuggers stop on breakpoints in the same places.
Any thoughts what could be the cause of this behavior?
If a source file has changed and the source no longer matches the code you're debugging, the debugger won't set breakpoints in the code by default. Normally, this problem happens when a source file is changed, but the source code wasn't rebuilt. To fix this issue, rebuild the project.
Event breakpointsIn the right-side debugging pane, next to Call stack, you can select the “Breakpoints” tab. Then, click the “Add event breakpoint” button and select the event you want to break on from the list. You can optionally add a condition expression to prevent execution from being stopped every time.
To set a breakpoint in source code, click in the far left margin next to a line of code. You can also select the line and press F9, select Debug > Toggle Breakpoint, or right-click and select Breakpoint > Insert breakpoint.
Hamlet, in the comments to OP question, gave the correct answer.
Uncheck the following option:
Internet Options > Advanced > Disable Script Debugging (Internet Explorer)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With