deactivate() fails to execute #3586
Labels
Issue-Bug
A bug to squash.
Resolution-Fixed
Will close automatically.
Up for Grabs
Will shepherd PRs.
Milestone
Prerequisites
Summary
In the exported
deactivate()
function, it first calls to alllanguageClientConsumers
'dispose()
. I noticed that two of them are throwing error, and preventing the rest of thedeactivate()
logic from running (e.g. the session manager'sstop()
is never run).The two offenders are ShowHelp and DebugSession. The common reason of their failure is that, in the ts file a command variable is declared but never assigned. When the ts is compiled to js file, these variables got omitted. Therefore, when the consumer's dispose() tries to dispose these command variables, variable can't be found.
For example, ShowHelpFeature has a
deprecatedCommand
. It is accessed here. Here is the relevant part of the js file from vsix:The one from DebugSession is this one.
If I comment out the
dispose()
calls in the installed js file, I can verify from log file that things are back to work (these two lines are currently missing):PowerShell Version
Visual Studio Code Version
Extension Version
[email protected]
Steps to Reproduce
Visuals
No response
Logs
Current:
After my local fix:
The text was updated successfully, but these errors were encountered: