0

I know about the debugger keyword: it works as a breakpoint if the developer tools are already open.

But is there a way to programmatically instruct the web browser to open the developer tools? I've cruised through the MDN docs but haven't found anything.

The use case would be that I need to debug a part of a web that gets opened in a new tab. I can't open it in the same tab and by the time I hit F12 I've already missed the code I'm trying to debug.

Thanks in advance for any help

perepm
  • 812
  • 8
  • 20
  • You can start most browsers with command line arguments or configure to automatically open dev tools on all new tabs. Does this help: [Automatically open Chrome developer tools when new tab/new window is opened](https://stackoverflow.com/questions/12212504/automatically-open-chrome-developer-tools-when-new-tab-new-window-is-opened#38366206)? – jabaa Jun 01 '22 at 11:26

0 Answers0