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
I use a bunch of .code-workspace files
Interesting! Do you want to share an example of .code-workspace files and how to switch between servers?
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.
I'd appreciate any example of a ready-made .code-workspace file, thank you in advance!
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).
Thank you, Mike! will give it a try!
You might find VS Code Profiles useful.
Thanks, @John Murray ! Do you have any examples connecting both locally and remote?