0

The VsCode IDE supports several different “editors” (views) over a given source file, such as Debugger, Source Control, and Editing, etc. How can I quickly switch between the various available views—given the current file and cursor location—while keeping, or “jumping to,” the same currently selected/focused line location? Note that this may involve initially opening an eligible “editor” if there is not one already open?

Ideally, a keyboard shortcut that would navigate from the current source code line in (i.e.) the Debugger... directly to that same source code line in the Git changes view...

In other apps, this is sometimes called “syncing” the current location between the views, so I was hoping to find a little “cycling icon” to press in the VsCode GUI somewhere.

2
  • As far as I am aware, the debugger is not a separate "view". Debugging is a mode. You might get a different file if you have some sort of transpilation and haven't set up source maps. So what exactly do you mean by "debug editor/view"? Commented Sep 6, 2023 at 23:42
  • Well that's the crux of the question: to an end user, the mode shouldn't matter; it's the same source file, and one would like to continue looking at it, on the same line, by navigating to the same place in it, but in another other "mode" (as you say), such as source-control diff, or plain editing, etc. It's true that the "debugger" case is a little weird, becaue you might not have a relevant debugging session running at the time... Commented Sep 7, 2023 at 2:37

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.