How can we debug JavaScript with IE 8 ?
The JavaScript debbuging with Visual Studio doesn't work after an update to IE 8.
But fortunately, all modern browsers have a built-in JavaScript debugger. Built-in debuggers can be turned on and off, forcing errors to be reported to the user. With a debugger, you can also set breakpoints (places where code execution can be stopped), and examine variables while the code is executing.
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.
If your browser supports debugging, you can use console.log () to display JavaScript values in the debugger window: Tip: Read more about the console.log () method in our JavaScript Console Reference. In the debugger window, you can set breakpoints in the JavaScript code.
While Microsoft declared the end of support for IE11 by Aug 17th, 2021, with many people still using the browser, it is useful to have some debugging skills to hand. We’ll be using Raygun Crash Reporting to find the stack trace and the line of code the error occurred on.
Like other browser debugging tools, the IE Developer Tools allow you to inspect and debug pages that are local or on a server. The latter is useful when you’d like to figure out how a site accomplishes some scripted task. The Developer Tools are accessible from the Tools menu, or via the F12 button:
Try entering alert ('Hello!'); and hitting Enter — you should see the alert appear straight away. The Console tab is a valuable debugging tool as you can use it as a scratchpad for trying out code and evaluating variables as you diagnose your problem. To debug the code, you first need to navigate through your source code in the Developer Tools.
I discovered today that we can now debug Javascript With the developer tool bar plugins integreted in IE 8.
You can use watch, breakpoint, see the call stack etc, similarly to debuggers in professional browsers.
You can also use the statement debugger;
in your JavaScript code the set a breakpoint.
You can get more information about IE8 Developer Toolbar debugging at Debugging JScript or Debugging Script with the Developer Tools.
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