Devtools of Chrome/Edge are "jumping" to the sources tab
Asked Answered
O

2

20

One thing is annoying me already a longer time and I could not find out how to change this. Whenever I am developing my web apps, the dev tools of Chrome always jump to the "sources" tab automatically (in german: "Quellen" like in my gif animation.)
This tab is not interesting for me, because I am debugging with VS Code already.
I want to see the output of the console or the network tab all the time.

But the browser always jumps there and I always have to go back to my wanted tab if I am reloading the page.

I demonstrated this behaviour here with a gif animation:

enter image description here

Any idea how to change this annoying behaviour? Or is there a good reason for this?

Oldwife answered 15/10, 2021 at 7:36 Comment(6)
Looks like a bug in devtools. You can report it on crbug.com if it's not reported yet and not fixed in Chrome Canary (it can be installed separately in addition to your main Chrome).Buine
Hard to believe - this behaviour is there since a long time already. Other developers must have noticed already... its super annoying...Oldwife
Check the Breakpoints panel. It happens when you set a breakpoint, you can remove the breakpoint or go to devtools options and disable this behavior.Buine
I do not have any breakpoints at all... what do you mean with "disable this behavior"? Where can I do that?Oldwife
In options: puu.sh/IjwYH/1bfb5c5749.pngBuine
This behaviour will also happen if you are debugging via vscode and have a breakpoint defined in vscode (as opposed to defined in the chrome/edge debugger itself). Remove the breakpoints from both chrome/edge and vscode.Trilobate
B
44

I had the same issue. Solved doing : DevTools options -> sources -> uncheck "Focus Sources panel when triggering a breakpoint"

Betwixt answered 10/11, 2021 at 14:20 Comment(1)
I'm using the VSCode debugger and Edge DevTools and when I have DevTools open it still gets focus even with this setting unchecked.Splurge
E
2

Even though @Devip answer fixed the annoyance of source tab automatically being focused, it did not fix actual issue - source tab would still automatically open and close files.

In my case the issue was that I had breakpoints set in VSCode itself, rather than DevTools. (not sure if it's relevant, these breakpoints were unbound because I was working on a userscript, which can't be mapped to the browser). The DevTools would simply flash debugger paused message for a split of a second and open a file in the source tab. In some cases it would open and immediately close files. I couldn't figure out why these files were opened...

My solution was to remove ALL breakpoints in VSCode and restart debugger session.

Eohippus answered 24/9, 2023 at 15:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.