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

Global launch.json option #18401

Closed
kutsan opened this issue Jan 11, 2017 · 11 comments
Closed

Global launch.json option #18401

kutsan opened this issue Jan 11, 2017 · 11 comments
Assignees
Labels
config VS Code configuration, set up issues debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality
Milestone

Comments

@kutsan
Copy link

kutsan commented Jan 11, 2017

I have this file and can use my every project. I just don't want to copy them all the time. VSCode generates .vscode/launch.json file every time at project root, this is no good for me. Is it possible to have just one static and default launch config file? Or a option to avoid this copying problem?

{
    "version": "0.2.0",
    "configurations": [
		{
			"type": "node",
			"request": "launch",
			"name": "Launch Program",
			"program": "${file}",
			"cwd": "${workspaceRoot}",
			"runtimeExecutable": "/usr/local/bin/node"
		}
    ]
}

launch.json

  • VSCode Version: 1.8.1
  • OS Version: macOS 10.12.2
@mjbvz mjbvz added config VS Code configuration, set up issues debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality labels Jan 12, 2017
@bpasero
Copy link
Member

bpasero commented Jan 13, 2017

fyi @weinand @isidorn

@isidorn
Copy link
Contributor

isidorn commented Jan 13, 2017

@kutsan currently it is not possible to have one global launch.json file which would be used everywhere, but what works is to add a "launch" object inside your user settings (preferences > user settings). This way it will be shared across all your workspaces
Example:

"launch": {
		"version": "0.2.0",
		"configurations": [
			{
			"type": "node",
			"request": "launch",
			"name": "Launch Program",
			"program": "${file}",
			"cwd": "${workspaceRoot}",
			"runtimeExecutable": "/usr/local/bin/node"
			}
		]
	}

@isidorn isidorn closed this as completed Jan 13, 2017
@isidorn isidorn added this to the January 2017 milestone Jan 13, 2017
@weinand
Copy link
Contributor

weinand commented Jan 13, 2017

@isidorn this is a feature that we mention in the release notes (and the doc).

@isidorn
Copy link
Contributor

isidorn commented Jan 13, 2017

@weinand makes sense, we should market it proper

@matyasforian
Copy link

@weinand Where is it in the docs? Ive looked here: https://code.visualstudio.com/docs/getstarted/settings and here: https://code.visualstudio.com/docs/editor/debugging but could not fund anything.

@weinand
Copy link
Contributor

weinand commented Apr 4, 2017

@isidorn please add this to the generic debugger doc.

@matyasforian
Copy link

matyasforian commented Apr 4, 2017

Also the "launch" tag is not recognized by IntelliSense in the settings.. this is a bug I guess. Ill make a report.

@isidorn
Copy link
Contributor

isidorn commented Apr 5, 2017

I have added this section to the debugging doc
https://github.com/microsoft/vscode-docs/blob/vnext/docs/editor/debugging.md#L96

@matyasforian
Copy link

@isidorn thanks for the very quick fix! It looks nice, but something is still not clear to me:
What is the order of precedence of this? Does a launch configuration in the user/workspace setting override a launch config in the launch.json? Perhaps it'd be good to clarify this.

@weinand
Copy link
Contributor

weinand commented Apr 5, 2017

And I suggest to include an inline example in the documentation (instead of a link to an issue).

isidorn added a commit to microsoft/vscode-docs that referenced this issue Apr 5, 2017
@isidorn
Copy link
Contributor

isidorn commented Apr 5, 2017

I have added an example inline in the documentation and I have clarified that if a launch.json is present in the workspace the global launch confiugration is ignored.
Thanks for feedback!

@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
config VS Code configuration, set up issues 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