Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set breakpoints on each line of code?

I want to inspect how one of my chrome extensions works. I've opened its code in Chrome and would like to see which functions are called after extension starts.

How can I set breakpoints on each line of code or debug the whole code?

like image 219
danielleontiev Avatar asked Oct 17 '16 18:10

danielleontiev


People also ask

How do you set a breakpoint at a certain line of your program?

To set breakpoints, type "break [filename]:[linenumber]". For example, if you wanted to set a breakpoint at line 55 of main. cpp, you would type "break main.

How do breakpoints work in code?

Software Breakpoint They work by patching the code you are trying to execute with an instruction that triggers a debug event in some fashion. This is accomplished by injecting a breakpoint instruction or when that is not supported by inserting an instruction that causes a fault that halts the core.


1 Answers

Open the Devtools Sources panel. Open the Content scripts tab, and browse to the extension script you want to debug.

enter image description here

like image 195
joews Avatar answered Oct 10 '22 19:10

joews