views:

17

answers:

1

Is there a JavaScript command that will cause the Visual Studio 2010 debugger to break?

Trying break(); didn't work because it's only valid within loops. Also stop(); failed because it picked up that stop() doesn't exist and I didn't have a useful stack trace.

+1  A: 

Javascript has a debugger statement, it woks in firebug, so it should in VS 2010 as well.

12.15 The debugger statement

Evaluating the DebuggerStatement production may allow an implementation to cause a breakpoint when run under a debugger. If a debugger is not present or active this statement has no observable effect.

ECMA-262 5th Edition

galambalazs