How to debug JavaScript code with Internet Explorer
I’ve used the new JS features (intellisense,debugging) in Visual Studio 2008 when I was developing an ASP.NET application and I was happy with it. Today I develop a JSF Ajax application with some external frameworks like Mootools and I face a problem with Internet Explorer 7. I can’t use firebug … but I found a solution : use Visual Studio 2008 Express Web edition with a blank project. Here’s the steps :
- Download Visual Studio 2008 Visual Web developper Express edition.
- Create a new blank Website project
- Right click on the project and choose “Property Pages”. You can set the starting URL (for me it’s the Tomcat webapp context url) :
- Launch the debug
- When the page is loaded, open it in VS (in the explorer pane you can see the files loaded) and set a breakpoint
- Now you can inspect variables, change code through the “immediate window” like during a regular .NET debugging session.
N.B. : check in the I.E. options that debugging is not disabled :
Billet publié dans les rubriques Programmation le