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

Extensions with a onDebugDynamicConfigurations are eagerly activated at startup in v1.50 #108578

Closed
DanTup opened this issue Oct 13, 2020 · 8 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues insiders-released Patch has been released in VS Code Insiders on-release-notes Issue/pull request mentioned in release notes verified Verification succeeded
Milestone

Comments

@DanTup
Copy link
Contributor

DanTup commented Oct 13, 2020

In 1.50, any extension that has onDebugDynamicConfigurations in its activation events is immediately activated when opening any project loading VS Code. This did not happen in v1.49.

[2020-10-13 10:37:47.815] [exthost] [info] ExtensionService#_doActivateExtension Dart-Code.dart-code {"startup":false,"extensionId":{"value":"Dart-Code.dart-code","_lower":"dart-code.dart-code"},"activationEvent":"onDebugDynamicConfigurations"}

There's some discussion around this in #96297 / #88230 and my understanding is that they should not be activated so early. This leads to other issues such as language extensions spawning their language servers for every project (whether they should is another issue - but there's no guidance from VS Code on how they should handle this, especially without knowing why they were activated).

DanTup added a commit to Dart-Code/Dart-Code that referenced this issue Oct 13, 2020
Should be reverted it microsoft/vscode#108578 is a bug, or updated if this is new expected behaviour.
@connor4312 connor4312 assigned weinand and unassigned connor4312 Oct 13, 2020
@connor4312 connor4312 added the debug Debug viewlet, configurations, breakpoints, adapter issues label Oct 13, 2020
@weinand weinand assigned isidorn and unassigned weinand Oct 19, 2020
@weinand weinand added the bug Issue identified by VS Code Team member as probable bug label Oct 19, 2020
@weinand
Copy link
Contributor

weinand commented Oct 19, 2020

@isidorn IIRC, we have discussed the approach for avoiding early activation in #96297.

@isidorn
Copy link
Contributor

isidorn commented Oct 23, 2020

@DanTup correct but we are activating only the type that is needed I assume.
Does this happen all the time, or only when a user has used a dynamic configuration from Dart and reloads the window?

If that is the case, we need to get dynamic configs on startup to be able to select the proper one.

@isidorn isidorn added info-needed Issue requires more information from poster and removed bug Issue identified by VS Code Team member as probable bug labels Oct 23, 2020
@isidorn isidorn removed this from the October 2020 milestone Oct 23, 2020
@DanTup
Copy link
Contributor Author

DanTup commented Oct 23, 2020

@isidorn it's worse than that - the extensions are activated unconditionally at startup of VS Code. If you install the Dart extension, click File -> Close Folder, then Reload Window you'll see Dart is immediately activated without doing anything (or even having any workspace folder open).

Screenshot 2020-10-23 at 17 33 27

@isidorn
Copy link
Contributor

isidorn commented Oct 26, 2020

Assigning to October to investigate more

@isidorn isidorn added this to the October 2020 milestone Oct 26, 2020
@isidorn isidorn added under-discussion Issue is under discussion for relevance, priority, approach bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster under-discussion Issue is under discussion for relevance, priority, approach labels Oct 26, 2020
@isidorn
Copy link
Contributor

isidorn commented Oct 26, 2020

@DanTup thanks a lot for reporting this and sorry about the breakage.
I have pushed a fix for this, so please try it out with vscode insiders from tomorrow and let us know how it goes. Thanks a lot!

@DanTup
Copy link
Contributor Author

DanTup commented Oct 26, 2020

Thanks, will do!

@DanTup
Copy link
Contributor Author

DanTup commented Oct 27, 2020

@isidorn fix looks good to me, thanks!

@isidorn
Copy link
Contributor

isidorn commented Oct 27, 2020

Great, thanks for letting us know. Adding verified label.

@isidorn isidorn added the verified Verification succeeded label Oct 27, 2020
@isidorn isidorn added the on-release-notes Issue/pull request mentioned in release notes label Oct 30, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Dec 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues insiders-released Patch has been released in VS Code Insiders on-release-notes Issue/pull request mentioned in release notes verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants
@DanTup @weinand @isidorn @connor4312 and others