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
isidorn opened this Issue Nov 9, 2018 · 7 comments

Comments

Projects
None yet
3 participants

@isidorn isidorn added this to the November 2018 milestone Nov 9, 2018

@isidorn isidorn self-assigned this Nov 9, 2018

@isidorn

This comment has been minimized.

Copy link
Contributor

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 label Nov 9, 2018

@isidorn

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link
Member

roblourens commented Nov 9, 2018

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

This comment has been minimized.

Copy link
Contributor

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 felixfbecker/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

@YisraelV

This comment has been minimized.

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

This comment has been minimized.

Copy link
Contributor

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://github.com/Microsoft/vscode-node-debug/blob/660175936b0d83277a1b8b2a8a0f2f868ccd032b/package.json#L169

Hope that helps, and thanks for your contribution

@isidorn

This comment has been minimized.

Copy link
Contributor

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 Jan 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment