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

Support interactive variables in launch configurations #7026

Closed
weinand opened this issue May 30, 2016 · 7 comments
Closed

Support interactive variables in launch configurations #7026

weinand opened this issue May 30, 2016 · 7 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues
Milestone

Comments

@weinand
Copy link
Contributor

weinand commented May 30, 2016

This is a feature required for #6569.

For details please see my prototype in the andre/pickervariables branch:

https://github.com/Microsoft/vscode/blob/andre/pickervariables/src/vs/workbench/parts/debug/electron-browser/debugService.ts#L564

@weinand weinand added the debug Debug viewlet, configurations, breakpoints, adapter issues label May 30, 2016
@weinand weinand added this to the June 2016 milestone May 30, 2016
@isidorn
Copy link
Contributor

isidorn commented May 31, 2016

@weinand I checked out the branch and the code looks good. Though I have some things which I would change, would your prefer:

  • I incorparate all that feedback and rewrite parts of your code on master
  • You create a PR and I add comments on your PR

Both work equally fine for me 😊

@weinand
Copy link
Contributor Author

weinand commented May 31, 2016

@isidorn my code is not meant as a PR, it was just code that I wrote to unblock me. Since you are the owner of the launch config variable substitution you should implement this feature.

@isidorn isidorn assigned weinand and unassigned isidorn May 31, 2016
@isidorn
Copy link
Contributor

isidorn commented May 31, 2016

Pushed a first version of this to master, check it out and let me know what you think.
Seems to work fine for the mock debug example - note that the variable name is case sensitive and in package.json of mock debug you contribute 'PickProcess'

@weinand
Copy link
Contributor Author

weinand commented May 31, 2016

@isidorn looks great! I've released "Attach to Process" support for node-debug to master.
One issue I saw: dismissing the process picker with ESC does not abort the launching of the debug session.

@isidorn
Copy link
Contributor

isidorn commented Jun 1, 2016

I pushed the change that dimissing hte process picker silently aborts the debug session - let me know if we should show an info message in that case.

Also feedback on following wording is welcome. When extension writer hovers over variables in package.json we say 'Mapping from interactive variables (e.g ${action.pickProcess}) in launch.json to a command.'

When there is an interactive variable which is not contributed we say: 'Adapter {0} does not contribute variable {1} that is specified in launch configuration.'

@weinand
Copy link
Contributor Author

weinand commented Jun 2, 2016

@isidorn if an action variable is used multiple times in a launch config, the associated command should only be run once.

The reason behind this is as follows:
For a user the mental model of action variables should be that a variable has a value and that VS Code ensures that this value is initialised once, and not that every use of an action variable is a function call with a potentially different result.

isidorn added a commit that referenced this issue Jun 2, 2016
…g, the associated command should only be run once

#7026
@isidorn
Copy link
Contributor

isidorn commented Jun 2, 2016

@weinand pushed a fix that should take care of this issue - so an action will get triggered only once even if it occurs multiple times in launch.json

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
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
Projects
None yet
Development

No branches or pull requests

2 participants