-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
replace settings variables in debugger config #8042 #8784
replace settings variables in debugger config #8042 #8784
Conversation
@DonJayamanne, thanks for your PR! By analyzing the annotation information on this pull request, we identified @isidorn and @egamma to be potential reviewers |
} | ||
|
||
protected resolveString(value: string): string { | ||
let regexp = /\$\{settings\.(.*?)\}/g; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer if you just read the configuration every time you need to resolve the string.
Not sure if doing it the current way you can end up with a stale configuration.
@DonJayamanne PR looks good overall - I added comments in the commits directly. Also:
Adding @weinand |
I have only tested this with a folder workspace.
Will do.
Great idea. However, wouldn't this render SystemVariables obsolete? From what I can see this is only used in two places, running tasks and debug adapters. Also it could be a little misleading, if we used this new class SettingsVariables where ever SystemVariables was being used, then one would be mistaken into assuming that only Settings (config) variables were being replaced. I think this all boils down to the fact that this SettingsVariables (having extended SystemVariables) class will be doing two things:
If you agree with the above then, how about we proceed with the following approach:
Agreed, for now I'll continue using the word "Setting" and SettingsVariables so there's no confusion. |
@DonJayamanne no folder workspace is the purple vscode - the window which you get when you say 'new window'. In that scenario we do not support debugging but just open that window and check for exceptions - since a lot of things are missing in that scenario. Your proposed approach sounds good to me, can you code it up and then we can provide more comments? Thanks! |
@@ -169,8 +168,8 @@ export class ConfigurationManager implements debug.IConfigurationManager { | |||
@IQuickOpenService private quickOpenService: IQuickOpenService, | |||
@IKeybindingService private keybindingService: IKeybindingService | |||
) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will probably throw an exception if you open the no-folder workspace.
That is the reason why I originally check for this.contextService.getWorkspace(), I think you need to re-introduce that check.
@DonJayamanne pr looks great! There are only two things which should be updated - I commented in the code directly! |
@isidorn , please check again, Thanks |
@DonJayamanne looks great! Sorry for the slow response, last week I was on vacation -> merging |
@DonJayamanne please create a test plan item for this so we can test it next week in the endgame - thanks! |
@DonJayamanne looks great! I just assigned it to the current milestone (july) so it is easier for the endgame master to find it. I would also mention to try it for |
Provide the ability to expose (share) settings from the settings.json file to the launch.json file, using the dollar notation. #8042
settings.json:
launch.json: