ssmsnet
ssmsnet

Reputation: 2306

JavaScript Debugging

I am using Visual Studio 2010 Express Developer edition. Developing a Website. I'm using JavaScript in my .aspx pages. How to put breakpoints in Javascript.

Any help is highly appreciated.

Thank You

Upvotes: 1

Views: 246

Answers (7)

Nasser Hadjloo
Nasser Hadjloo

Reputation: 12610

Using FireBug & Internet Explorer Debuging tool let you debug and put breakpoint on your javascript files

Upvotes: 0

Grant Thomas
Grant Thomas

Reputation: 45083

I think the idea is to use the Attach to process option of the Debug menu; but to be honest, I've never had much luck getting VS to do this fluidly (though I remember it working at times, success is spasmodic at best), maybe tabbed browsing has made this an issue - I'm unsure.

One thing I can recommend, however, and we might get a few hecklers, are the Developer Tools of IE9. If nothing else, IE9 has become an invaluable tool for me recently simply because of its Javascript debugging capabilities. Here's an MSDN article to get you started with this.

Upvotes: 0

McStretch
McStretch

Reputation: 20645

If you're debugging IE, use the following links:

For Firefox, I recommend Firebug.

For Chrome, you can use the Developer's Tools debugger.

Update

Here's a comprehensive list of debugging JavaScript in each browser:

http://siliconforks.com/doc/debugging-javascript/

Upvotes: 1

Oded
Oded

Reputation: 499002

If you are using Web Developer Express you can do this within Visual Studio - here are the instructions.

If you are using a different Express edition, you will have to use a browser tool for client side debugging - for example Firebug. IE and Chrome have built in developer tools that have this kind of functionality.

Upvotes: 2

Jon Malcolm
Jon Malcolm

Reputation: 461

From memory you will need to do the following to get JS debugging in Visual Studio:

  1. Ensure that Internet Explorer has script debugging enabled (somewhere in tools -> options) - this is the bit most people don't know about.
  2. Then go into the .aspx and add a breakpoint by clicking in the left margin of the line of Javascript you want to debug.
  3. Launch the website project in debug mode (F5) and hit the page using IE - your breakpoint should then hit.

As noted by other people you can use a host of other (usually better) tools that come with other browsers.

Upvotes: 1

Abdelraouf Ouadjaout
Abdelraouf Ouadjaout

Reputation: 124

You can use your browser's debugger :

  • For Firefox, you can use Firebug (http://getfirebug.com).
  • Chrome contains an embedded debugger.

Upvotes: 1

VikciaR
VikciaR

Reputation: 3412

I like Firebug, plugin for Firefox.

Upvotes: 0

Related Questions