- Make sure script debugging is not disabled in Internet Explorer.
In MSIE: Tools > Internet Options... > Advanced > Uncheck "Disable Script Debugging (Internet Explorer)"
- Navigate to the page you wish to debug. The page doesn't have to be part of any VS.NET project, you can debug any web page you'd like.
- Open VS.NET. If you already have a ASP.NET project you are working on, open it. Otherwise, just open a new project which you will delete later.
- Start the VS.NET debugger (F5 or Debug > Start)
- In VS.NET, navigate to the Running Documents menu.
In VS.NET: Debug > Windows > Running Documents
The Running Documents menu should appear on the right. If the page you are debugging belongs to the project you are working on and is the page that is currently being debugged, it should already show-up in the running document list under "Microsoft Internet Explorer."
If not, you have to attach to the MSIE process of the window you would like to work with. To do that:
In VS.NET: Debug > Processes...
Find the instance if iexplorer.exe that relates to the page you wish to debug. If there are multiple instance, look at the Title column to find the page. Select the page and click the Attach... button, then Close. You should now see the selected web page show-up in the Running Documents menu.
- Double click on the web page you wish to debug in the Running Documents menu. This should open up the HTML of the page in a new window. Now set a break-point on the line of code you which to start debugging, and away you go!
An assortment of ASP.NET, VB.NET, web development, and Windows XP tips-n-tricks.
Thursday, November 11, 2004
Debugging JavaScript
I'm not an expert JavaScript programming, but I do know enough to get-by, and I do know that it's insanely tedious to debug! Well, I should say it used-to be tedious, thanks to VisualStudio.NET and MSIE 6. To debug JavaScript, follow these steps:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment