Discussion
· Dec 21, 2025

VSCode Connections Local and Remote - Best practices?

Hi noble developers!

Have a question/discussion. Sometimes, while developing, we'd need to connect VSCode directly to a remote server (e.g., stage one) for debugging purposes. And after change back to local one. And then to remote again.

How do you perform this switching in VSCode in a convenient way?

I have several settings.json files (settings_local, settings_remote) which I put to a main settings.json when I need to make VSCode to connect to switch the connection:

Is it the best practice? Or maybe there is some option to make VSCode remember several of them and easily switching via command/button and indiicate clearly where I am? 

I develop locally for both cases.

Share your best practices?

Discussion (8)4
Log in or sign up to continue

Hi,

You don't really need to deal with the files holding the workspace settings (I've never looked at them). The most useful commands are under the "File" menu, e.g. "Save Workspace As..." and "Open Workspace from File...". You are already using a default workspace, so just set it up as you want, and then save it "As...".

After that it also appears in the list of "recent folders and workspaces" when you right click the VS Code icon on the task bar. I have two: one for a local namespace, and one for remote. I can open both as separate windows. They each open exactly as I left them - folders, files, projects, etc. (opening without selection assumes you want the last one closed).