Chrome javascript debugger breakpoints don't do anything?

前端 未结 21 1156
时光说笑
时光说笑 2020-12-02 18:14

I can\'t seem to figure out the Chrome debugging tool.

I have chrome version 21.0.1180.60 m.

Steps I took:

  1. I pressed ctrl-shift-i to bring up t
21条回答
  •  春和景丽
    2020-12-02 18:23

    So, in addition to Adam Rackis' answer, if you have errors in your javascript file above the breakpoint, you won't reach it regardless if you flag it, or put in debugger;.

    Here's an example:

    if (nonExistentVar === "something") {
      console.log("this won't happen as the above errors out");
    }
    debugger;
    console.log("this won't print either")
    

提交回复
热议问题