Skip to content

Handle non-string return values from the user's prompt function #344

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
Jan 18, 2017

Conversation

daviwil
Copy link
Contributor

@daviwil daviwil commented Jan 18, 2017

This change adds a catch for the InvalidCastException when gathering the
user's prompt string in the case where their prompt function returns a
value other than a string. In this case a default prompt is returned.

This change also improves the way we write prompts for the debugger.
Instead of writing out the prompt each time the debugger stops, we write
out the details about the breakpoint that was hit, if any. We also try to
preserve any session context at the beginning of the prompt string like
the remote computer name or process ID.

Fixes #339.

This change adds a catch for the InvalidCastException when gathering the
user's prompt string in the case where their prompt function returns a
value other than a string.  In this case a default prompt is returned.

This change also improves the way we write prompts for the debugger.
Instead of writing out the prompt each time the debugger stops, we write
out the details about the breakpoint that was hit, if any.  We also try to
preserve any session context at the beginning of the prompt string like
the remote computer name or process ID.

Fixes #339.
@daviwil daviwil added this to the 0.9.0 milestone Jan 18, 2017
@daviwil daviwil merged commit 003fc2b into develop Jan 18, 2017
@daviwil daviwil deleted the daviwil/fix-debug-prompt branch January 18, 2017 22:56
TylerLeonhardt pushed a commit to TylerLeonhardt/PowerShellEditorServices that referenced this pull request Feb 26, 2019
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