a developer's notes – a semi-technical web development BLOG

March 27, 2013

How to debug into javascript/jquery when working with Visual Studio

Filed under: ASP.NET,Javascript / JQuery — Duy Nguyen @ 12:12 am
Tags: , , ,

Add debugger in your javascript code.

Within your Javascript code, add the line

debugger;

1. Using Visual Studio:
You can execute (F5) your application and debug with Visual Studio and the application will stop on your line of code. Note** You have to use Internet Explorer if you want to use Visual Studio.

js_vs

2. Use Chrome:
Just add the same line of code but have the Developer Tools open when you navigate to your page that executes your javascript code.

js_chrome

3. Use Firefox:
Just add the same line of code but have Firebug open when you navigate to your page that executes your javascript code.

js_firefox

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: