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

Leaner launch.json generation #62851

Closed
6 of 12 tasks
isidorn opened this issue Nov 9, 2018 · 7 comments
Closed
6 of 12 tasks

Leaner launch.json generation #62851

isidorn opened this issue Nov 9, 2018 · 7 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues help wanted Issues identified as good community contribution opportunities

Comments

@isidorn isidorn added this to the November 2018 milestone Nov 9, 2018
@isidorn isidorn self-assigned this Nov 9, 2018
@isidorn
Copy link
Contributor Author

isidorn commented Nov 9, 2018

@weinand houghts if node should be simplified, currently it generates the following file

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "request": "launch",
            "name": "Launch Program",
            "program": "${file}"
        }
    ]
}

imho I like this and would not add any wizard that asks if you would like to launch / attach
I think the bigger issues are other extensions and I would start there

@isidorn isidorn added the debug Debug viewlet, configurations, breakpoints, adapter issues label Nov 9, 2018
@isidorn
Copy link
Contributor Author

isidorn commented Nov 9, 2018

@roblourens chrome currently generates this

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "type": "chrome",
            "request": "launch",
            "name": "Launch Chrome against localhost",
            "url": "http://localhost:8080",
            "webRoot": "${workspaceFolder}"
        },
    ]
}

I also like that and I think we should be aligned with what node is doing.
What you profit from using quick pick to ask some questions? Did you notice that users get puzzled by something or that somethins is especially hard to setup? Like source maps for example?

@roblourens
Copy link
Member

Configuring sourceMapPathOverrides and pathMapping is still an issue, but it's something you have to "discover" by looking at the app during runtime, I wouldn't try to make it easier during launch config creation.

If we want to optimize for few parameters by default, webRoot could be removed and defaulted to workspaceFolder. I think it helps to have it in the default config so it can be discovered more easily but I don't know how often it has to be changed.

@isidorn
Copy link
Contributor Author

isidorn commented Nov 14, 2018

Adding help wanted as we need user help currently for ruby and might potentially need it for other extensions. The work needed is updating ruby to use the newest vscode debug configuration api. More details can be found here rubyide/vscode-ruby#404 and the PR should be done against that repository.

Another repository which the users could help with is PHP. More details here xdebug/vscode-php-debug#318

There are extensions which are already using latest vscode debug configuration api which can be used as examples, for instance node debug

@isidorn isidorn added help wanted Issues identified as good community contribution opportunities feature-request Request for new features or functionality labels Nov 14, 2018
@isidorn isidorn modified the milestones: November 2018, December 2018 Nov 30, 2018
@YisraelV
Copy link
Contributor

YisraelV commented Dec 3, 2018

@isidorn after struggling for some time with escaping the $ symbol in configurationSnippets I found this syntax in the node extension you linked to:

"localRoot": "^"\${workspaceFolder}"",

could you please tell me:

  1. is there any documentation on the use of the caret symbol as escape character in snippets (could be I'm missing the obvious)
  2. why isn't the syntax provided here (under Grammar) enough for escaping? it didn't work for me.

Thank you.

@isidorn
Copy link
Contributor Author

isidorn commented Dec 3, 2018

@YisraelV here's some snippet documentation https://code.visualstudio.com/docs/editor/userdefinedsnippets
For more details @jrieken would be better to answer. But I think there are some corner cases with the $ symbol and thus it has to be double escaped. I would just try to copy what nodeDebug does
https:/Microsoft/vscode-node-debug/blob/660175936b0d83277a1b8b2a8a0f2f868ccd032b/package.json#L169

Hope that helps, and thanks for your contribution

@isidorn
Copy link
Contributor Author

isidorn commented Jan 4, 2019

We have provided feedback to most popular extensions, some are already updated and some are planning to update. Since all the work pllaned has been done I am closing this
Some related follow up work #65988

@isidorn isidorn closed this as completed Jan 4, 2019
@isidorn isidorn removed the feature-request Request for new features or functionality label Jan 22, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Feb 18, 2019
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 help wanted Issues identified as good community contribution opportunities
Projects
None yet
Development

No branches or pull requests

3 participants