C# and JavaScript Debug Step Through

G

Greg Setnes

I am using JavaScript with my C# web application, so I'm not sure I should
be posting a JavaScript question here, but here it goes anyways.

Currently, I can step through my C# code in the Code Behind files, but can I
step through the Javascript code as well? If not, how could I achieve such a
thing, if at all possible?
 
A

Anthony Jones

Greg Setnes said:
I am using JavaScript with my C# web application, so I'm not sure I should
be posting a JavaScript question here, but here it goes anyways.

Currently, I can step through my C# code in the Code Behind files, but can I
step through the Javascript code as well? If not, how could I achieve such a
thing, if at all possible?

Sure. If you are using the development server then you will find VS will
have attached to the IE process it launches when you run the app for Script
debugging. The best approach I've found is to place Javascript debugger
keyword at the point in code you would like to start debugging. Breaks
points do work but they can be a bit flaky especially in inpage javascript.
The are best set once you've actually started debugging.

If you're not on VS2008 I would recommend you customise your menu and
include the script explorer somewhere (for some reason its not available
anywhere byt default). VS2008 displays the 'running scripts' (as it used to
be called in the olden times) as part of the solution explorer.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top