Search code examples
javascriptie11-developer-tools

Understanding unreachable breakpoints in IE11 F12 Developer tools


I have an issue I'm trying to debug on our website, where a particular javascript routine is not being found. I'm at a loss to identify why, but my thinking is that if the F12 Dev tools can't reach the code for some reason, then anything in that script block is inaccessible and will not be executed.

Is there somewhere I can look to for an explanation of why code in one script block is reachable, and another, seemingly identical block is unreachable?

Illustration of reachable and unreachable code


Solution

  • Although I awarded the bounty to the first post, the actual answer is that an error in the second block of javascript invalidates the entire block for breakpoint handling.

    To diagnose this (if the code isn't your own, or you wrote it a long time ago and have forgotten where you made changes) is to break each routine into its own separate block, then find the block that is still failing. Then, go through that routine with a fine-toothed comb to determine the cause of the syntax failure -- be thorough!

    Once I identified the cause (a misplaced semicolon), then breakpoints were re-enabled for the entire block.

    Other causes could be that the code block is unreachable, due to duplicate function names. That wasn't my case, however, so I didn't confirm this as a possible cause of unreachable breakpoints.