vscode-perl-debug
vscode-perl-debug copied to clipboard
Print statements don't show up until program terminated
I am running the following simple test script:
use strict;
use warnings;
use Cwd;
print "Hello, world!";
print getcwd;
But I only am able to see the print
statements' output after the program has terminated and the debugging session is over. The "result" section of the debug console shows nothing after executing n
(next
).
Here is the output I get in the debuggee terminal, where the script's output shows up only after the debug console says the debugging session has been terminated (after I step through the entire script):
For more information, I am on Windows 10, running Strawberry Perl 5.30.1.
Is this a bug or is this an issue on my end?
Thanks!
You can solve this by turning on autoflush:
BEGIN{ $| = 1; }
It would be nice if the debugger just did this by default, but it isn't really a bug...