Can you set a JavaScript breakpoint in a UserControl?
Visual Studio 2008, ASP.NET. Can you set a JavaScript breakpoint in a UserControl ascx page? I can set it in an aspx pa开发者_StackOverflow社区ge.
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
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.
精彩评论