Does Visual Studio Code have a 'back' button?

Viewed 3010

When I Cmd + click on the line of execution of a function (f()), it takes me to where the function was defined (f(){}). It'd be great to have a 'back' button to go back to wherever I was before, now that I've finished looking at the function. Does anyone know of such a feature or a feature that'd help?

P.S. I'm on Mac

4 Answers

It's not a button, but there's a keyboard shortcut: press alt + left arrow, and you'll be taken to the place where you were before. (Browsers and Windows Explorer have this shortcut too - alt + left arrow usually takes you to the previous page, but they also have back buttons)

You can use workbench.action.navigateBack my keyboard shortcut defaulted to Ctrl+Alt+- for Back and Ctrl+Shift+- for forward

As of v1.68 I think, if you enable the Command Center in vscode with this setting:

Window: Experimental Command Center

and just

Window: Command Center

(note no "Experimental") in Insiders v1.69 and presumably Stable v1.69 you will get a left and right arrow in the title bar which are bound to the Go Back and Go Forward commands Alt+Left and Alt+Right

Related