Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to go to a specific line in a java script file in Chrome Developer Tools?

Most of the time we are dealing with big java script files. And while debugging we need to locate specific line in script files. I realized that there is no information for this in stackoverflow, and wanted to supply answer here. This is how to go to a specific line in a java script file in Chrome Developer Tools. See the answer below.

like image 676
ozanmut Avatar asked Dec 18 '25 06:12

ozanmut


2 Answers

While a java script file is open in the sources tab, press CTRL + O type a colon and line number after it :[LineNo] (:575 etc) enter.

If you want to go to specific column on a specific line then use two colons to specify line number and column number at the same time :[LineNo]:[ColumnNo] (:575:50 etc) enter.

like image 158
ozanmut Avatar answered Dec 20 '25 21:12

ozanmut


Ctrl + G / Cmd + G like anywhere else.

Your solution requires a one more step to achieve the goal

like image 35
Panama Prophet Avatar answered Dec 20 '25 20:12

Panama Prophet



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!