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

Comments

Projects
None yet
6 participants
@kutsan

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

This comment has been minimized.

Show comment
Hide comment
@bpasero
Member

bpasero commented Jan 13, 2017

@isidorn

This comment has been minimized.

Show comment
Hide comment
@isidorn

isidorn Jan 13, 2017

Contributor

@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"
			}
		]
	}
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 Jan 13, 2017

@isidorn isidorn added this to the January 2017 milestone Jan 13, 2017

@weinand

This comment has been minimized.

Show comment
Hide comment
@weinand

weinand Jan 13, 2017

Member

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

Member

weinand commented Jan 13, 2017

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

@isidorn

This comment has been minimized.

Show comment
Hide comment
@isidorn

isidorn Jan 13, 2017

Contributor

@weinand makes sense, we should market it proper

Contributor

isidorn commented Jan 13, 2017

@weinand makes sense, we should market it proper

@matyasforian

This comment has been minimized.

Show comment
Hide comment
@matyasforian

matyasforian commented Apr 4, 2017

@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

This comment has been minimized.

Show comment
Hide comment
@weinand

weinand Apr 4, 2017

Member

@isidorn please add this to the generic debugger doc.

Member

weinand commented Apr 4, 2017

@isidorn please add this to the generic debugger doc.

@matyasforian

This comment has been minimized.

Show comment
Hide comment
@matyasforian

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

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

This comment has been minimized.

Show comment
Hide comment
@isidorn
Contributor

isidorn commented Apr 5, 2017

@matyasforian

This comment has been minimized.

Show comment
Hide comment
@matyasforian

matyasforian Apr 5, 2017

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

matyasforian commented Apr 5, 2017

@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

This comment has been minimized.

Show comment
Hide comment
@weinand

weinand Apr 5, 2017

Member

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

Member

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

This comment has been minimized.

Show comment
Hide comment
@isidorn

isidorn Apr 5, 2017

Contributor

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!

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.