Telling Firebug to Break as Soon as any Javascript is Executed

前端 未结 5 2059
情书的邮戳
情书的邮戳 2021-02-04 11:00

I\'ve inherited a pile of code that\'s doing unexpected things when I click on some

5条回答
  •  遥遥无期
    2021-02-04 11:17

    Just press Pause button on the firebug panel (on the left-top corner of it, two yellow vertical lines, when Script tab selected) - and it will stops at first JS string.

    But it will stop JS executing really at ANY event - so if you have a button which catches mouse move and mouse click - i will not be able to stop on mouse click, since script will be stopped at mouse move each time you try to move mouse over this button. I suggest you just to insert alert()'s in the suspicious places - after some iterations you will found exactly string you need (where error occurs).

提交回复
热议问题