Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to have a global launch.json file?

I am using Don Jayamanne's Python extension and it is working well. The only issue I have is for every project I work on, I have to copy the \.vscode\launch.json file. I was wondering if there is a way to place that file somewhere globally so the settings are applied to all my projects. Something similar to how the global settings.json works for user settings.

In other words I am looking for a way to avoid having to copy \.vscode\launch.json to every folder I store and write python code in.

like image 413
Igor Avatar asked Apr 26 '16 14:04

Igor


1 Answers

Yes, it is possible - you need to put the requisite launch config directly in your user settings file, as described here.

From the linked page:

... 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"
        }
    ]
}
like image 108
Pavel Minaev Avatar answered Oct 14 '22 05:10

Pavel Minaev