views:

593

answers:

2

Why can't microsoft make setting a breakpoint in visual studio equivalent to adding the "debugger" keyword in javascript? I want to test javascript cross browser in a unified way.

+3  A: 

Use the debugger keyword instead of setting breakpoints.. if the debugger is enabled, it will break...

debugger; //breakpoint here

As to why they don't work. Firefox doesn't use the MS scrpting engine,so the VS debugger doesn't attach to Firefox.

Tracker1
A: 

Use debugger;

or Sys.Debug.assert() which will hit a debugger statement if assert fails

Ryu