// Articles. Tutorials. Utilities.
Home  |   Search  |   Login  
Categories Skip Navigation Links
New / All
Google / Android
Python / IronPython
SQL Server
Putting a breakpoint at the very first JavaScript line
The question is how to break at the very first line of global code associated with the current asp.net application when debugging from Visual Studio.
Table of Contents

First thing is to make sure the Internet Explorer breaks for the JavaScript. By default, the script debugging is disabled in IE. To enable this, go to: Tools - Internet Options - Advanced (the Advanced tab in Internet Option dialog box) Under the ’Browsing’ section, uncheck the following item: Disable Script Debugging (Internet Explorer)

With the script debugging enabled, Visual Studio will now step through the JavaScript code as well. If the asp.net application you are debugging has any global JavaScript code, pressing F11 to start the program will break the execution at the very first line of the JavaScript code. From there on, if you keep pressing F11, you will be able to step through every line in the application.

This can be used a great learning tool to understand and maintain a site that you have inherited. This will also be extremely useful in understanding JavaScript intensive applications like FCKEditor or AjaxControlToolkit. These applications also have a large amount of global JavaScript code and set up a whole bunch of global objects before the application starts. With script debugging enabled, you can also click in the margin of JavaScript code to setup breakpoints.

Bookmark and Share This

More Articles With Similar Tags
This article shows how to embed the JavaScript files (.js) in your custom control dll. Along the way discusses the advantages of doing so.
This article looks at some quick basics of using the Android Debug Bridge that lets you manage the Android emulator/device.
Tags: android, adb, shell, debug
This article looks at what’s there (in terms of directories and processes) on an Android device/emulator via its shell.
This article looks at using SQLite from the Android shell.
Fiddler lets you capture the HTTP traffic on your computer very easily. You would be able to test how your site responds to requests from search engines very easily (by putting that user-agent string in the HTTP request). In addition, what’s discussed in this article can be used to debug things like the problems with RewritePath.
About  Contact  Privacy Policy  Site Map