Disable Sources panel in Chrome

Viewed 1111

I'm working through an Angular course via Visual Studio 2019 and Google Chrome (same thing happens in the New Edge).

Running F5 in Visual Studio brings up the website with rebuild/refresh on save. Great! The problem I have is it auto-switched to sources.

Can I disable the auto-switch to sources so it stays in Console like I want it too? It's real annoying to only want the Console yet always get kicked to sources.

enter image description here

Animated Gif

Edit: Specs of machine. Ask for more if needed.

  • Windows 20H2 updated as of yesterday.
  • Edge: Version 87.0.664.47 (Official build) (64-bit)
  • Chrome: Version 86.0.4240.198 (Official Build) (64-bit)
  • Visual Studio Enterprise 16.8.2.
2 Answers

I had the same issue and it was driving me nuts! The way I managed it to stop switching was to go to into the DevTools settings -> Preferences.

Under Sources options, uncheck Focus Sources panel when triggering a breakpoint.

After much testing and toying around, the issue was solved by removing the .vs folder in the solution folder.

A clean .vs folder is created and the problem disappears.

Returning the "bad" .vs folder returns the issue.

Related