Skip to Content
Beginning ASP.NET 3.5: In C# and VB
book

Beginning ASP.NET 3.5: In C# and VB

by Imar Spaanjaars
March 2008
Intermediate to advanced content levelIntermediate to advanced
766 pages
21h 15m
English
Wrox
Content preview from Beginning ASP.NET 3.5: In C# and VB

17.4. Debugging Client-Side Script

So far, you have used the debugging tools to debug ASPX pages and Code Behind. However, that's not all there is to it. Visual Studio 2008 now has great support for debugging client-side JavaScript as well. Debugging client-side JavaScript requires that you use Internet Explorer and won't work correctly with other browsers like Firefox or Opera. The cool thing about debugging client-side JavaScript in VWD is that you already know how to do it. You can use the same familiar tools that you have seen in this chapter to debug both server-side and client-side code.

The JavaScript that is eventually used by the page in the web browser can come from a lot of different sources. You can have JavaScript in external script files, embedded in the page, in a master page, and even server controls can emit their own JavaScript. This makes it difficult sometimes to break in the right code, as you don't always know where it comes from. Fortunately, VWD has a great solution for this; it lets you set breakpoints in the final HTML being displayed in the browser. To show you in what file you're adding breakpoints or what code you are debugging, VWD updates the Solution Explorer and displays a list of all files containing client-side script that you can step through as soon as you are in debug mode. Breakpoints you set in these files during debugging are preserved when possible, making debugging a smooth experience.

The easiest way to learn the new client-side JavaScript ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning ASP.NET 4: in C# and VB

Beginning ASP.NET 4: in C# and VB

Imar Spaanjaars
Professional ASP.NET 3.5 SP1 Edition: In C# and VB

Professional ASP.NET 3.5 SP1 Edition: In C# and VB

Bill Evjen, Scott Hanselman, Devin Rader

Publisher Resources

ISBN: 9780470187593Purchase book