📜 ⬆️ ⬇️

Debugging JavaScript in MS IE with Visual Web Developer

Microsoft gave us a free tool to debug JavaScript in Internet Explorer.

I’m used to using Firebug regularly to debug JavaScript in Firefox. This powerful tool gives us such debugging tools “familiar from childhood”, such as:

You sit down on such control as a drug. When it comes time problems with Internet Explorer, begins breaking.
To debug JavaScript in IE, I tried different things. Firebug Lite allowed to use the console, but it didn't help much in debugging. In addition, it requires, in my opinion, too serious processing of the original
Html

The Microsoft Script Debugger pleased me with the lack of code in Firebug, but it didn't help much in the intellectual battle with jQuery.

There are hundreds of options. And my terms are already burning ...
In the end, I settled on Microsoft Visual Web Developer Express Edition (I, however, have the 2005 version). Fans of Firebug who find themselves in my circumstances will understand me:
')


Everything is as in Greece :) Everything works, and what is important - it is free. Legally and not for one month. Most of this monster has been sharpened for working with ASP.NET as a Microsoft (who would doubt it), but I successfully ignored all this, having nevertheless achieved efficiency from my script. In general, does not interfere :).

How to achieve full debugging in IE + VWD


  1. Install MS VWD EE.
    I ask you to excuse those who were expecting a solution within a few megabytes - this thing weighs quite a lot. Me an ISO image
    the 2005 version of 400 megabytes in size downloaded at home brother - in the office, so much Internet in one hand does not give even for very valid reasons.


  2. Enable script debugging in IE
    Open "Internet Options" and on the Advanced tab, find the checkbox "Disable script debugging (Internet Explorer)". Take it off. Some people also advise you to check the “Notify about every script error” checkbox (if you find it, I, for example, do not have one).
  3. Create a debugging site in VWD.
    The site in VWD terminology is just something like a project, like a Project in Eclipse.
    I read the advice about creating a just empty site and, having started it, go to the address in need of debugging. It did not work for me, intentionally erroneous instructions didn’t cause anything but the swearing at IE itself. But nevertheless, they advise time - try, well, suddenly.


    I did a more reliable way - I created a really working site with a root folder, really referring to the site folder in the locale (you can also via FTP if there is no locale, but we are good boys, right?). I registered in the properties of the project the launch addresses corresponding to the local Apache.

  4. Start debugging the site.
    Upstairs, in the very first toolbar, there is a Start Debugging button with a green triangle. It will launch IE and connect VWD to it for debugging. You can safely navigate through the pages after that - the debugger picks up on them the same way.
    Update: If instead of IE, you are launching another browser, in the Solution Explorer panel, right-click on an empty space, select Browse With ... and in the appeared window assign it to IE browser. By the way, as eyewitnesses testify, simply making IE the default browser in the system for some reason does not roll in such a situation. At this step, VWD asked me about the fact that there was an error in the project build, and if I wanted to launch the last successful one. Since I knew for sure that there weren’t any builds yet, and the site is working, and the project properties have a working address, I confidently clicked Yes - and ...

  5. Debug! Have, as they say, complete fun.
    ... yes, imagine, the brainchild of Microsoft did not preserve the site for me in locale, did not demand IIS and ASP, and was not at all capricious, but quietly and peacefully
    launched IE, changed the layout of the panels in the window to debug, and demonstrated all my scripts in the Script Explorer panel. Anyone could be opened, where you need to set breakpoints, add watch, well, just do it, all the joys of debugging.



Everything!
I have built up this whole garden only in order to clarify one thing in the end: you should not forget about crutches for the “most popular browser” after their use. They hang their event handlers, assign their classes and modify
CSS . The fact that everything that is visible to the naked has worked in IE the same way as in normal browsers does not mean that everything else is the same. But now I have a JavaScript debugger for IE, no worse than Firebug.

Source: https://habr.com/ru/post/23073/


All Articles