Step
1
:
Open an existing asp.net application in Visual Studio
2003/05 if there is any, which uses JavaScript or create a new demo
application from scratch.
Step
2
:
When we create a web project in
Microsoft’s Visual Studio a file in the name of web.config is
created by default in the web project.
We need to check the following setting:
<
compilation
debug
=
"false"
strict
="false"
explicit
="true"
/>
Then change the debug setting to “true”
as in the following.
<
compilation
debug
=
"true"
strict
="false"
explicit
="true"
/>
Step
3
:
Open Internet Information Service
(IIS). Here is how to open IIS.
Start à Settings à Control Panel à Administrative Tools
à Internet Information
Services
à Expand Web Sites à Default Web Site à right click on your web project
you want to debug and click properties à click Directory Tab à click configuration à in the new opened window click
Tab Debugging and if two check boxes labeled “Enable Server Side
Script Debugging” and “Enable Client Side Script Debugging” are
unchecked then check those two check boxes. (Pl refer to Screen
Shot 1)
Figure 1
Step
4
:
Open the Internet Explorer browser,
click on menu Tools à
Internet Options à
Advanced Tab à if
Disable Script Debugging (Internet Explorer) and Disable Script
Debugging (Other) check boxes are checked then uncheck those two
check boxes and click button OK. (Refer Screen Shot 2)
Figure 2
Step
5
:
Now, open your web project in Visual
Studio IDE. Select menu Tools.
If you open the project in VS 2003
then under Tools menu select attach a process and select aspnet
process and attach the process to the application.
If you open the project in VS 2005
then it does not require you to explicitly attach the aspnet
process. In the JavaScript add a break point where you want to
debug and also add a break point in the .vb or .cs code file where
the JavaScript function is called.
Step
6
:
Run the project by clicking on icon
Start. The application will start and wait at the break point where
you placed the break point.
|