简体   繁体   English

为什么 Visual Studio javascript 断点在萤火虫中不起作用?

[英]Why don't visual studio javascript breakpoints work in firebug?

Why can't microsoft make setting a breakpoint in visual studio equivalent to adding the "debugger" keyword in javascript?为什么微软不能在 Visual Studio 中设置断点相当于在 javascript 中添加“调试器”关键字? I want to test javascript cross browser in a unified way.我想统一测试javascript跨浏览器。

Use the debugger keyword instead of setting breakpoints.. if the debugger is enabled, it will break...使用 debugger 关键字而不是设置断点。如果启用了调试器,它将中断...

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. Firefox 不使用 MS 脚本引擎,因此 VS 调试器不附加到 Firefox。

Use debugger;使用调试器;

or Sys.Debug.assert() which will hit a debugger statement if assert fails或 Sys.Debug.assert() 如果断言失败,它将触发调试器语句

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM