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

Allow user defined default launch.json for specific language #36108

Closed
eromoe opened this issue Oct 12, 2017 · 5 comments
Closed

Allow user defined default launch.json for specific language #36108

eromoe opened this issue Oct 12, 2017 · 5 comments
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality
Milestone

Comments

@eromoe
Copy link

eromoe commented Oct 12, 2017

Hi,

Is there anyway to create a user defined default launch.json for specific language?

For example:
I want to add Pytest or some custom config to python debug configurition, but I have to manually add that config to each project's launch.json . Usually we want a global launch.json sync to all project.

feature would be:

  1. user define default launch.json for specific language
  2. a setting parameter : overwrite current project's launch.json to newest , when user defined launch.json changed (or current vscode is focused)

At first, I post on https://github.com/DonJayamanne/pythonVSCode/issues/1292 , because they say it is by vscode , so I repost here .

@vscodebot vscodebot bot added the debug Debug viewlet, configurations, breakpoints, adapter issues label Oct 12, 2017
@auchenberg
Copy link
Contributor

@eromoe Can you elaborate on the specific use-case? I'm not sure I fully understand. You want to install/provide a launch.json for user's workspace when they install the pythonVSCode extension or open a new workspace?

@eromoe
Copy link
Author

eromoe commented Oct 12, 2017

  1. pythonVSCode would provide launch.json for each python project

pythonVSCode would automatically create a predifined launch.json use for debug:
image

content is like


{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python",
            "type": "python",
            "request": "launch",
            "stopOnEntry": true,
            "pythonPath": "${config:python.pythonPath}",
            "program": "${file}",
            "cwd": "${workspaceRoot}",
            "env": {},
            "envFile": "${workspaceRoot}/.env",
            "debugOptions": [
                "WaitOnAbnormalExit",
                "WaitOnNormalExit",
                "RedirectOutput"
            ]
        },      
        {
            "name": "PySpark",
            "type": "python",
            "request": "launch",
            "stopOnEntry": true,
            "osx": {
                "pythonPath": "${env:SPARK_HOME}/bin/spark-submit"
            },
            "windows": {
                "pythonPath": "${env:SPARK_HOME}/bin/spark-submit.cmd"
            },
            "linux": {
                "pythonPath": "${env:SPARK_HOME}/bin/spark-submit"
            },
            "program": "${file}",
            "cwd": "${workspaceRoot}",
            "env": {},
            "envFile": "${workspaceRoot}/.env",
            "debugOptions": [
                "WaitOnAbnormalExit",
                "WaitOnNormalExit",
                "RedirectOutput"
            ]
        },
.....
}
  1. I want to add a debug config named PyTest , which can use in every existed project, or new created project .

  2. But now, launch.json is create by pythonVSCode with its default launch.json . Except the project I modified myself, neither new project nor other old projects would have PyTest .

  3. So a global user defined launch.json (different for python, js, go ..etc) , automatically sync with each project would be good.

Other use-case is something similar: https://github.com/DonJayamanne/pythonVSCode/issues/1239

@isidorn
Copy link
Contributor

isidorn commented Oct 12, 2017

We currently support having a global launch.json that a user can specify in his configuration file. More about this #18401
Apart from that any debugger can customize the launch.json any way he wants, more about that can be found in https://code.visualstudio.com/updates/v1_16#_debug-api-updates

@isidorn isidorn closed this as completed Oct 12, 2017
@eromoe
Copy link
Author

eromoe commented Oct 12, 2017

I have clarified that if a launch.json is present in the workspace the global launch confiugration is ignored.

I think this global config is useless in most situation(different debuggers have their own).

At least,

  1. If I add custom python and js gloabl config , I wouldn't like to see the js config show on python project.
  2. Please provide a parameter, to make global config auto merge into workspace's config or not.

I have describe the details, I think this feature is not only a global config. Sync/merge config is the big point.

Please consider to reopen this.

@isidorn isidorn reopened this Oct 12, 2017
@isidorn isidorn added the feature-request Request for new features or functionality label Oct 12, 2017
@isidorn isidorn added this to the Backlog milestone Oct 12, 2017
@isidorn isidorn removed their assignment Oct 12, 2017
@weinand weinand changed the title [Feature Request]Allow user defined default launch.json for specific language Allow user defined default launch.json for specific language Nov 14, 2017
@isidorn
Copy link
Contributor

isidorn commented Nov 17, 2017

This feature request will not be considered in the next 6-12 months roadmap and as such will be closed to keep the number of issues we have to maintain actionable. Thanks for understanding and happy coding!

@isidorn isidorn closed this as completed Nov 17, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 1, 2018
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

3 participants