Skip to content
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

Closed
edvinv opened this issue Jan 8, 2016 · 19 comments
Closed

Operating System Specific Properties in launch.json #1873

edvinv opened this issue Jan 8, 2016 · 19 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality
Milestone

Comments

@edvinv
Copy link

edvinv commented Jan 8, 2016

... it would be nice to have them. For example: OS specific env variables...

@felixfbecker
Copy link
Contributor

+1

@isidorn isidorn added debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality labels Jan 11, 2016
@isidorn
Copy link
Contributor

isidorn commented Jan 11, 2016

fyi @weinand

@weinand
Copy link
Contributor

weinand commented Jan 11, 2016

Proposal: wrapping any attribute or group of attributes in a sub structure "osx", "linux", and "windows" makes it OS specific.

@felixfbecker
Copy link
Contributor

Yes, and env variables declared without an OS should merge with the OS specific ones.

@isidorn isidorn added this to the Backlog milestone Jan 14, 2016
@joekim
Copy link

joekim commented Mar 3, 2016

@weinand
+1 for proposal. Need to specify a different "runtimeExecutable" when on osx vs. win32

@JimiC
Copy link
Contributor

JimiC commented May 31, 2016

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

@weinand
Copy link
Contributor

weinand commented Jun 2, 2016

@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" 
}

@isidorn
Copy link
Contributor

isidorn commented Jun 2, 2016

@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

@felixfbecker
Copy link
Contributor

@isidorn please do that on the VS Code side

@weinand
Copy link
Contributor

weinand commented Jun 2, 2016

@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" 
   }
}

@isidorn
Copy link
Contributor

isidorn commented Jun 2, 2016

on windows

{
   "type": "node",
   "request": "launch",
   "runtimeExecutable": "mynode.exe",
   "Windows": {
     "runtimeExecutable": "mynode.exe" 
   },
   "OSX": {
     "runtimeExecutable": "mynode" 
   },
   "linux": {
     "runtimeExecutable": "mynode" 
   }
}

@felixfbecker
Copy link
Contributor

thats fine 👍

@weinand
Copy link
Contributor

weinand commented Jun 2, 2016

@isidorn intellisense inside the OS sections works?

@JimiC
Copy link
Contributor

JimiC commented Jun 2, 2016

Excuse my ignorance but doesn't OSX use "mynode.app"?
@isidorn And what about outDir (when using Electron with Typescript)?

@weinand
Copy link
Contributor

weinand commented Jun 2, 2016

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

@JimiC
Copy link
Contributor

JimiC commented Jun 2, 2016

@weinand Thanks for clarifying. I see it now. The executable is in "*.app/Contents/MacOS/".

@isidorn
Copy link
Contributor

isidorn commented Jun 2, 2016

@weinand not inside, but you get OS sections offered top level

@weinand
Copy link
Contributor

weinand commented Jun 2, 2016

@isidorn we should offer intellisense for the OS types on the top level and repeat the intellisense inside the OS sections.

@isidorn
Copy link
Contributor

isidorn commented Jun 2, 2016

Added intellisense inside os sections

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

6 participants