Friday, March 04, 2005

Debugging JavaScript in VS.NET for ASP.NET application

The following tip will explain how you can setup your JavaScript code to be debugged in VS.NET.
1. Create a file named something.js and then add all your JavaScript functions to this file.
2. Add the js file to your ASP.NET project.
3. Then in every ASP.NET page that will call one of those functions add the following line to the HEAD section of the page. script lanaguage=“javascript“ src=“something.js“
4. Before running the solution in debug mode set a break point in the .js file where you would like it to stop.

Now run the solution in debug mode and VS.NET will break at that point every time the application executes that code.

0 Comments:

Post a Comment

<< Home