1

If I set breakpoints in the background js of my chromium extension, then disable/enable it, the breakpoints are not hit. I've tried adding debugger; in the js, but I still cannot enter the debugger.

Is there a way to enter the debugger immediately upon installing or enabling an extension?

1 Answer 1

3

Add the debugger; statements, and inspect your background page. Then, use F5 (or location.reload() from the console) to refresh the Developer Tools. This will actually refresh the background page, letting you debug the page from the top.

Note: this will not work for "first run" code, but will for "start up" code.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.