How to step through code in Google chrome javascript debugger

前端 未结 4 1177
隐瞒了意图╮
隐瞒了意图╮ 2020-12-05 02:45

I am really getting frustrated with Google Chrome... I have version 3.0.195.27 and want to debug some JavaScript that is working in IE, FF but not in Chrome.

When I

相关标签:
4条回答
  • 2020-12-05 03:05

    I recommend you to debug with FireBug. It is the absolutely best tool for it.

    I have Chrome version 4.0.221.6, and there i got a button list where i can step in / step through

    so maybe you need to update your Chrome version?

    0 讨论(0)
  • 2020-12-05 03:16

    Use the pause, step over, step into, step out buttons at the right end of the inspector, below the search field and above the watch/call stack section.

    0 讨论(0)
  • 2020-12-05 03:17

    In addition to the F8 (Run) F10 (Step over) and F11 (step into) you can single step your code by clicking on the line number at the left of each line and one at a time create a breakpoint on each line. Then by using F8 your code will run one line and stop at the next breakpoint. This has the effect of enabling you to single step through your code. If the next code line is a function then use F10 or F11 depending on the result you desire.

    Someone voted down this answer, but didn't say why. A comment would be helpful. If you have a better way to single step through the code, please add a comment explaining your approach.

    0 讨论(0)
  • 2020-12-05 03:18

    I'm on Chrome 3.0.195.27, and I'm able to use the following keys:

    • F8 -> Run

    • F10 -> Step over

    • F11 -> Step into

    Make sure you have focus on the JavaScript console.

    0 讨论(0)
提交回复
热议问题