6

I am quite new to javascript, I often find the need to walk through JS codes line by line to get better understanding how the code works. But manully setting breakpoints for each line in the 'source' panel of chrome is just too time-consuming, is there a way to do this automatically? In fact, in some very complicated projects, JS files are littered everywhere in the project folders, it is quite hard and troublesome to locate and open them all in the source panel. So is there a way to let chrome execute JS 1 line at a time, no matter which files the line is in?

BDL
  • 21,052
  • 22
  • 49
  • 55
shenkwen
  • 3,536
  • 5
  • 45
  • 85
  • possible duplicate of [Set a javascript breakpoint in code - in chrome?](http://stackoverflow.com/questions/10050465/set-a-javascript-breakpoint-in-code-in-chrome) – gmo Jun 15 '15 at 22:06

2 Answers2

5

Once your code breaks, there's a button beside "resume script execution" called "step over next function call" or F10, which will resume step by step.

Felix Guo
  • 2,700
  • 14
  • 20
0

The accepted answer is to press F10, which steps over the next function call.

If you truly wish to step a single step at a time however, F9 is simply "step."

David Mays
  • 466
  • 4
  • 14