Skip to content

Global launch.json option #18401

Closed
Closed

Description

@kutsan

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

Activity

  1. added
    config
    debug
    feature-request
    on Jan 12, 2017
  2. bpasero commented on Jan 13, 2017

    @bpasero
    Contributor
  3. isidorn commented on Jan 13, 2017

    @isidorn

    Kutsan Kaplan (@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"
    			}
    		]
    	}
  4. weinand commented on Jan 13, 2017

    @weinand
    Contributor

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

  5. isidorn commented on Jan 13, 2017

    @isidorn

    Andre Weinand (@weinand) makes sense, we should market it proper

  6. weinand commented on Apr 4, 2017

    @weinand
    Contributor

    Isidor Nikolic (@isidorn) please add this to the generic debugger doc.

  7. matyasforian commented on Apr 4, 2017

    @matyasforian

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

  8. matyasforian commented on Apr 5, 2017

    @matyasforian

    Isidor Nikolic (@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.

  9. weinand commented on Apr 5, 2017

    @weinand
    Contributor

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

  10. isidorn commented on Apr 5, 2017

    @isidorn

    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!

  11. locked and limited conversation to collaborators on Nov 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

configdebugfeature-request

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions