-
Notifications
You must be signed in to change notification settings - Fork 510
Debug Session Clutters Terminal Command History #873
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
Comments
Thanks Mike! This is coming from PowerShell, I had filed a bug on it some time ago: I'll see if I can find a workaround that doesn't cause these commands to be added to your history. |
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
@SydneyhSmith @TylerLeonhardt |
|
Any updates on this? Just wasted a few hours debugging a Start-Transcript call in my code only to realize that the strange logs was caused by the debugger itself from the VS Code PowerShell extension. |
Um, well, it is fixed in the preview as of right now, but our fix might not be viable long-term. Give the preview a try! |
@TheOnlyWei Did you get a chance to try the Preview? |
@andschwa The 7.3-preview does not seem to list this fix in the change description. I switched VS code integrated console to PowerShell Core 7.3-preview anyway and it didn't fix anything. Did it work for you on your machine? |
The latest code is available in the PowerShell Preview for VS Code, and includes a myriad of fixes. Could you verify if this issue still reproduces using the preview extension? Please note that this preview is likely to include other bugs, and you should feel free to file new issues for those so we can work through them. Thanks again! |
@TheOnlyWei See my reply above, I meant the preview of the extension, not PowerShell's preview version itself (sorry for the confusion). Thanks! |
@andschwa The output clutter is greatly reduced, but still getting some stuff like the following that is not output in the console:
|
Ah! Thanks @TheOnlyWei, can definitely fix the rest of this! |
Well, that's interesting. I'm actually not sure why those last bits are showing up, as the default for |
Going to leave this one open to track the remaining work. |
Hey @TheOnlyWei can you test the latest release and let me know both what you see and how you test it? I'd like to get this finished if I can. |
Closing this as resolved |
System Details
$PSVersionTable
:Issue Description
I am experiencing a problem with commands being inserted into the command history by a debugging session. The additional commands seem to be related to the debugging session. I have reproduced this issue with a simple .ps1 file containing a single variable assignment, with a breakpoint set on the line.
Repro.ps1:
$x=1
The entires I'm referring to are Ids 5-9 in the below transcript. The "Get-Variable" entries in the command history appear to be triggered by hovering the mouse over a variable in the editor window to view its value. I'm not sure what triggers the ones.
The text was updated successfully, but these errors were encountered: