Divakar
Divakar

Reputation: 672

How to use breakpoints in Javascript code in .ASPX page of Visual Studio 2008

I have Javascript in my .aspx design source page. How can i set breakpoints and run as i set it for a .cs page. I am using Visual Studio 2008 for my coding. I have browsed for the use of debugger. But i couldn't get how to use it properly. If debugger; is used, can someone elaborate on how its used.

Upvotes: 0

Views: 1861

Answers (1)

Tamim Al Manaseer
Tamim Al Manaseer

Reputation: 3724

If you put a debugger; statement and you're using IE, the browser will throw a "Script Debugging" error and prompt you for a debugging tool, you can select VS 2008 from the list.

Make sure to have the "Disable Script Debugging" options in IE unchecked.

Alternatively, you can use "Debug > Attach To Process" and attach the debugger to your browser processes, after that you can put a regular break point from visual studio on your javascript code and it will work.

Upvotes: 1

Related Questions