Skip to content

Add new "attach" and "interactive" debugging configurations #423

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 4 commits into from
Jan 10, 2017

Conversation

daviwil
Copy link
Contributor

@daviwil daviwil commented Jan 9, 2017

This change adds new configuration possibilies for PowerShell debugging in
the extension. The first is simply to allow the user to not specify a
script file in their "launch" configuration; when such a configuration is
launched it merely drops them into an interactive shell in the Debug
Console where they can enter whatever commands they like.

The other new configuration is a new "attach" configuration which allows
the user to specify a process ID or a remote computer and process ID to
which the debugger should be attached when it launches. This provides a
smooth attach/detach experience so that the user does not need to go into
an interactive console to initiate the Enter-PSSession and
Enter-PSHostProcess commands manually (though this is still possible and
supported in interactive debugging mode).

@daviwil daviwil added this to the 0.9.0 milestone Jan 9, 2017
@@ -160,7 +160,7 @@

"configurationSnippets": [
{
"label": "PowerShell: Launch Current File Configuration",
"label": "PowerShell: Launch Current Script",
Copy link
Contributor

Choose a reason for hiding this comment

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

Script is better than file but you might want to leave in "Configuration" at the end. This is what I see for the other langs that support debug configuration snippets:
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, you're right, I'll change it back

This change adds new configuration possibilies for PowerShell debugging in
the extension.  The first is simply to allow the user to not specify a
script file in their "launch" configuration; when such a configuration is
launched it merely drops them into an interactive shell in the Debug
Console where they can enter whatever commands they like.

The other new configuration is a new "attach" configuration which allows
the user to specify a process ID or a remote computer and process ID to
which the debugger should be attached when it launches.  This provides a
smooth attach/detach experience so that the user does not need to go into
an interactive console to initiate the Enter-PSSession and
Enter-PSHostProcess commands manually (though this is still possible and
supported in interactive debugging mode).
This change adds a handler for the editor/closeFile request which is part
of the editor extensibility model of PowerShell Editor Services.  This
request currently gets fired when the user exits a remote debugging
session where a remote file had been opened.  It will later be exposed
through the $psEditor API.
This change adds the PSAvoidUsingAliases rule back to our example
PSScriptAnalyzer configuration file so that it can be used for example and
testing purposes.
This change adds runspace connection details to the status bar indicator
when the user enters a remote session or PowerShell process through the
editing session.
@daviwil daviwil force-pushed the daviwil/debug-attach branch from 7ede29b to d95a375 Compare January 10, 2017 04:24
@rkeithhill
Copy link
Contributor

LGTM

@daviwil
Copy link
Contributor Author

daviwil commented Jan 10, 2017

Thanks Keith!

@daviwil daviwil merged commit 7849b0b into master Jan 10, 2017
@daviwil daviwil deleted the daviwil/debug-attach branch January 10, 2017 04:31
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.

3 participants