【问题标题】:Setting breakpoints on debug console code在调试控制台代码上设置断点
【发布时间】:2012-05-23 02:42:41
【问题描述】:

是否可以在 chrome 或 firebug 的调试控制台上输入的代码上设置断点?

【问题讨论】:

    标签: javascript debugging firefox google-chrome firebug


    【解决方案1】:

    当然!在控制台中输入:

    (function(){
        debugger;
        alert(0);
    })();
    

    DEMO, (open up console and re-run)

    【讨论】:

    • 哇,太好了!你是怎么知道的?
    • @artistoex:经验。如果我回答了问题,请随时单击答案旁边的复选框。
    猜你喜欢
    • 1970-01-01
    • 2022-01-18
    • 1970-01-01
    • 1970-01-01
    • 2017-04-26
    • 2022-01-06
    • 2015-05-05
    • 1970-01-01
    • 2011-07-16
    相关资源
    最近更新 更多