Written by

Senior Startups and Community Programs Manager at InterSystems Corporation
Discussion Evgeny Shvarov · 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?

Comments

Evgeny Shvarov  Dec 21, 2025 to Dmitrii Baranov

Interesting! Do you want to share an example of .code-workspace files and how to switch between servers?

0
Dmitrii Baranov  Dec 21, 2025 to Evgeny Shvarov

Nothing special... each file just defines the context for connecting to a specific IRIS instance (and also local and remote "folders"). The advantage is that the connection attributes for a specific server are stored in the same file, and I don't need to register “global” connection parameters for a specific IRIS server.

0
Evgeny Shvarov  Dec 23, 2025 to Dmitrii Baranov

I'd appreciate any example of a ready-made .code-workspace file, thank you in advance!

0
Mike.W  Dec 24, 2025 to Evgeny Shvarov

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).

0
Evgeny Shvarov  Dec 25, 2025 to Mike.W

Thank you, Mike! will give it a try!

0