为什么visual studio javascript断点不能在firebug中运行?

时间:2009-04-01 14:18:12

标签: javascript visual-studio-2008 debugging firebug

为什么microsoft不能在visual studio中设置断点,相当于在javascript中添加“debugger”关键字?我想以统一的方式测试javascript跨浏览器。

2 个答案:

答案 0 :(得分:4)

使用debugger关键字而不是设置断点..如果调试器已启用,它将会中断...

debugger; //breakpoint here

至于为什么他们不工作。 Firefox不使用MS scrpting引擎,因此VS调试器不会附加到Firefox。

答案 1 :(得分:1)

使用调试器;

或Sys.Debug.assert()如果断言失败将触及调试器语句