-
Notifications
You must be signed in to change notification settings - Fork 234
Debugger doesn't flush output reliably #138
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
Wait a tic, I see you haven't checked that PR in yet. Hmm, I wonder why I'm seeing this behavior then. |
Which script were you trying this with? I'll try to see if I can reproduce the behavior. |
Put this in a file and set a breakpoint on the second line: $pwd
$pwd The first $pwd doesn't display its output until you step over the breakpoint on the second one. |
I see the same behavior in the ISE too, I wonder if the debugging engine is hitting the breakpoint so fast that the output doesn't even get flushed to the PSHost layer. |
One thing I do notice though is that sometimes the debug adapter exits at the end of the script so fast that the final line of output might not get written (this is with a local build the buffering change). I'll need to make sure it gets flushed before exiting. |
Yeah, this definitely comes from the PowerShell layer. I just tried flushing buffered output when a breakpoint gets hit and nothing got written out. I'll mark this as something to investigate for a future release. |
@daviwil Any update on this one? I am running in VSCode using Powershell extension v0.7.2 on Windows. I have a simple script of:
Shows nothing in the Debug window nor in the PowerShell Output window. If I execute the lines using F8, I get output in the PowershellOutput window for the first and third commands. |
This change fixes an issue where script output for very small scripts is not being written out reliably before the debug adapter terminates. The fix is to add an extra output flush before sending the TerminatedEvent back to the client. This fix is temporary until we get the REPL integration online. Resolves #138. Resolves PowerShell/vscode-powershell#284.
Change expand alias shorcut
I've noticed while debugging that output from a line that has executed is not shown even though the script has hit a breakpoint on a subsequent line. I can step once and that is usually enough to get the output to appear. It would be nice though to have any pending output flushed on debugger stop.
The text was updated successfully, but these errors were encountered: