New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Operating System Specific Properties in launch.json #1873
Comments
+1 |
fyi @weinand |
Proposal: wrapping any attribute or group of attributes in a sub structure "osx", "linux", and "windows" makes it OS specific. |
Yes, and env variables declared without an OS should merge with the OS specific ones. |
@weinand |
👍 This will come very handy especially when developing Electron apps. Currently I'm stuck at changing the "runtimeExecutable" path each time when changing OS env. |
@isidorn am I right that this feature does not change the structure of the launch config that arrives in the debug adapter? Example: {
"type": "node",
"request": "launch",
"runtimeExecutable": "mynode",
"Windows": {
"runtimeExecutable": "mynode.exe"
}
} arrives in the debug adapter on OS X and linux as: {
"type": "node",
"request": "launch",
"runtimeExecutable": "mynode"
} and on Windows as: {
"type": "node",
"request": "launch",
"runtimeExecutable": "mynode.exe"
} |
@weinand no, I also send the "windows" part to each adapter. I could remove it - but we are not doing that for any other property so far - removing it from the launch.json |
@isidorn please do that on the VS Code side |
@isidorn and what are you sending to the adapter in this case: {
"type": "node",
"request": "launch",
"Windows": {
"runtimeExecutable": "mynode.exe"
},
"OSX": {
"runtimeExecutable": "mynode"
},
"linux": {
"runtimeExecutable": "mynode"
}
} |
on windows
|
thats fine 👍 |
@isidorn intellisense inside the OS sections works? |
Excuse my ignorance but doesn't OSX use "mynode.app"? |
@JimiC "mynode.app" is the name of the application folder (aka "application bundle'") which the Finders shows as the application "mynode" in the UI. But mynode.app is not an executable in the OS sense, so you can not use it with the "runtimeExecutable" attribute from above. For "runtimeExecutable" you have to specify a file that has the executable bit set, e.g. "/usr/local/bin/node". re 'outDir': the platform specific sections support the same attributes as the enclosing scope. |
@weinand Thanks for clarifying. I see it now. The executable is in "*.app/Contents/MacOS/". |
@weinand not inside, but you get OS sections offered top level |
@isidorn we should offer intellisense for the OS types on the top level and repeat the intellisense inside the OS sections. |
Added intellisense inside os sections |
... it would be nice to have them. For example: OS specific env variables...
The text was updated successfully, but these errors were encountered: