Your Location is: Home > Vscode-settings

VSCode settings - how to get a hostname when using Remote-SSH

From: St.Lucia View: 1359 Jindra Helcl 

Question

I am working remotely via the Remote-SSH plugin on a code which is located on an NFS filesystem on a GPU cluster. The project uses CMake. For debugging, I'd like to be able to work out of any machine on the cluster, and I'd like to use machine-specific build directories.

Is there a variable that stores the hostname so I can edit the following line in settings.json appropriately?

"cmake.buildDirectory": "${workspaceFolder}/build-${whatever_variable_stores_hostname}"

Best answer