Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

javascript line by line debugger

This might sound crazy but is there a debugger out there which automatically breaks on the first line of executed code ?

Sample : suppose I have debug mode on and I click on a button. Now the intelligent debugger should automatically set the breakpoint on the first line inside the .click({}) function.

This way it is very easy to see the starting point and very easy to backtrack.

There must surely be something.

Thanks

like image 430
Pulkit Agarwal Avatar asked Oct 21 '11 12:10

Pulkit Agarwal


1 Answers

Most debuggers in the browser allow you to insert the keyword

debugger;

into your code which will cause a break to occur at that point in the execution.

like image 192
Andy Hume Avatar answered Oct 26 '22 03:10

Andy Hume