views:

144

answers:

2

Visual Studio 2008, ASP.NET. Can you set a JavaScript breakpoint in a UserControl ascx page? I can set it in an aspx page.

A: 

Should not be any difference, a UserControl is just a part of an aspx page.

Writing debugger; in your script where you want a to start debugging usually solves it for me, and then choose either VS 2008 or any other debugger you may prefer in the select debugger window that appears. Or, if you use Firefox, just make sure you have Firebug active when you reach that point in the code.

einarq
+3  A: 

If you uncheck Disable Script Debugging in Internet Explorer it should hit debugger lines and prompt you with either the Built-In Debugger or you can use VS IDE. I don't think you need a semicolon afterwards

var i = 0;
debugger
// do work
hunter
If you're using the Firebug plugin for FireFox you can put a breakpoint on a certain line as well, similar to putting a breakpoint on a .net line of code
hunter