-
Notifications
You must be signed in to change notification settings - Fork 235
Fix command history while debugging #553
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
Fix command history while debugging #553
Conversation
This change fixes an issue where background commands would be added to PowerShell's history. This was due to a limitation in the PowerShell debugger where the only way commands are excluded is if the command is part of a hard coded set of commands. As a workaround, a command from that set (prompt) is added as the first statement. Resolves PowerShell/vscode-powershell#873
This change fixes an issue where the debugger was unable to obtain command history. Resolves PowerShell/vscode-powershell#550
Thanks so much for trying to fix this one! One thing I realized about using 'prompt' to suppress history, if the user has a custom prompt function that writes output directly to the console (Write-Host, etc), this approach might cause unwanted output to be written to the console. Can you try that and see if it's a problem? |
Maybe if PSReadline support makes this unnecessary we can skip it, though it might be useful for cases where PSES is used without support for the terminal PSHost implementation. |
I'm torn about what to do with this. PSReadLine does solve this for the most part, but it still shows up in
I haven't tested on 4, but I suspect that is where it would be an issue as it has For those interested, this fix depends on undocumented logic in the debugger to disable history if the command is member of a specific set of commands. The commands are The way I see it there's a couple options:
|
@SeeminglyScience can we close this since it's addressed in your PSRL PR? |
@tylerl0706 Yeah I'll close it, but it's not 100% addressed. Functionally it is, but there's still some strange side effects like Either way this PR is way too old, new changes would have to be in a new PR anyway. |
This change fixes command history while debugging.
ConsoleReadLine
not retrieving history correctly.