Skip to content

onDebug to onDebugResolve:type #1181

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

Merged
merged 2 commits into from
Feb 9, 2018

Conversation

TylerLeonhardt
Copy link
Member

@TylerLeonhardt TylerLeonhardt commented Jan 29, 2018

The docs say, in 1.19, VSCode made more fine-grained debugger activation events.

Read the link for the full details but the rule of thumb goes as followed:

Rule of thumb: If activation of a debug extensions is lightweight, use onDebug. If it is heavyweight, use onDebugInitialConfigurations and/or onDebugResolve depending on whether the DebugConfigurationProvider implements the corresponding methods provideDebugConfigurations and/or resolveDebugConfiguration.

The vscode-powershell extension implements just resolveDebugConfiguration here so we just need to replace onDebug with onDebugResolve:type

Resolves #1179

@TylerLeonhardt
Copy link
Member Author

@roblourens for the FYI (would also love your 👍 if you don't mind)

package.json Outdated
@@ -26,7 +26,7 @@
},
"main": "./out/src/main",
"activationEvents": [
"onDebug",
"onDebugResolve:type",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's all it takes? Cool.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked through the docs, changed this and debugging still worked so this looks right.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I need to update the engine version

Copy link
Contributor

@rkeithhill rkeithhill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@TylerLeonhardt
Copy link
Member Author

@rkeithhill
Copy link
Contributor

In the past, @daviwil has tried to support both the current version of VSCode and n-1 IIRC. This would deviate from the policy unless the VSCode team release 1.20 before we release 1.6.0. :-)

@roblourens
Copy link

LGTM, thanks! 1.20 will be released sometime in the middle of next week.

@TylerLeonhardt
Copy link
Member Author

TylerLeonhardt commented Jan 30, 2018

I'll keep this open until 1.20 is released since it's such a small change.

@TylerLeonhardt
Copy link
Member Author

1.20 was released a couple days ago! I'm going to merge this in now :)

@TylerLeonhardt TylerLeonhardt merged commit 5ad413c into PowerShell:master Feb 9, 2018
@TylerLeonhardt TylerLeonhardt deleted the onDebugResolveType branch February 9, 2018 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Should not use the "onDebug" activation event
3 participants