Skip to content

Fix casing of event messages from debug adapter #66

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 1 commit into from
Dec 11, 2015

Conversation

daviwil
Copy link
Contributor

@daviwil daviwil commented Dec 11, 2015

This change fixes the casing of event messages raised from the debug
adapter. This issue caused the VS Code debugger UI to not display details
correctly when stopped at a breakpoint.

This change fixes the casing of event messages raised from the debug
adapter.  This issue caused the VS Code debugger UI to not display details
correctly when stopped at a breakpoint.
@daviwil
Copy link
Contributor Author

daviwil commented Dec 11, 2015

Merging the pull request despite what appears to be a test failure. Still dealing with test hangs, will fix that after others are unblocked.

daviwil added a commit that referenced this pull request Dec 11, 2015
Fix casing of event messages from debug adapter
@daviwil daviwil merged commit c0b5a02 into master Dec 11, 2015
rkeithhill added a commit to rkeithhill/PowerShellEditorServices that referenced this pull request Jan 8, 2016
Ideally we should be using CallStackFrame.GetFrameVariables() but it currently seems to be broken.  We've been informed that using Get-Variable -Scope <num> isn't great because scope numbers and frames don't always line up.  For instance, dot source introducing a new stack frame but not a new scope.  But until GetFrameVariables is fixed in a future drop, we have no option but to use Get-Variable -Scope <num>.  This will result in stack frames that have no Auto or Local variables.  But the good news is that the debug host will no longer crash.  :-)

BTW this commit introduces a new optional parameter on PowerShellContext.ExecuteCommand().  While there is a parameter to suppress "output" there was no parameter to suppress "errors" from being written to the debug console.  I see no benefit in littering the user's debug console with a bunch of "get-variable : The scope number '#' exceeds the number of active scopes".  So there is now a "sendErrorToHost" parameter that defaults to true.  However, even when that parameter is set to false, the error info shows up in the DebugAdapter.log file.
@daviwil daviwil deleted the daviwil/event-casing branch February 16, 2016 04:49
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.

2 participants