Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I make the Internet Explorer Javascript debugger also pause on caught exceptions?

I am trying to debug a "property not found" exception that is only happening in IE. The bad part is that this exception is being caught and handled and I could only figure out how to make the IE 9 debugger pause on uncaught exceptions (Ctrl + Shift + E).

I can't temporarily remove the relevant try-catch clause without messing up my program logic and I'd rather not have to manually operate the debugger step-by-step. How can I easily find what line is generating my exception?

like image 835
hugomg Avatar asked Oct 17 '11 17:10

hugomg


People also ask

How do I edit JavaScript debugger in IE?

Our first experiment in the latest build allows you to edit any JavaScript file in the debugger source viewer. Enable the “Edit JavaScript” toggle and restart your browser. Once the feature is enabled, simply click on the Debugger's source viewer to place the cursor and start modifying your JavaScript!

How do I set a breakpoint in Internet Explorer?

Event breakpoints You can force execution to break when a specific event (or set of events) happen on the page. In 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.

What is pause on exception?

Pausing on exceptions pauses the code whenever an exception is thrown. This can help us find errors in our code. A stack trace traces where an error comes from. We can see the stack trace of an exception below the "Pause on caught exceptions" option.


1 Answers

After a while I conclude that there sadly is no easy way to force IE to halt on caught exceptions.

By the way, I have since solved the problem that triggered this question. I was console.log-ing a XML document and unlike Chrome and FF, IE doesn't handle that well. This is particularly annoying since I was using console.log calls to help debug >_<

like image 134
hugomg Avatar answered Sep 28 '22 07:09

hugomg