VS2008 javascript debugger in usercontrol
In a VS2008 web project, I have a usercontrol with some javascript that I want to debug. When I try to set a breakpoint, I get "This is not a valid breakpoint location." I tried this on a regular aspx page and was able to set a breakpoint exactly.
Is there some kind of limitation for setting javascript breakpoints in usercontrols? Are there any settings that need to be changed?
thank
I am also unable to set a breakpoint in my usercontrol.
You can try adding a keyword debugger;
, Sys.Debug.fail('message')
or Sys.Debugger.assert(a == 1)
to your javascript, to make the breakpoint work for this problem.
in vs .net you can add keyword debugger to your js function using piug-in browser development, since firebug (firefox, i.e. also has a dev plugin) the page stops at where you point the debugger. eg:
<script>
function myFunc()
{
debugger;
//do sth
}
</script>