Skip to content
This repository has been archived by the owner on Jan 13, 2021. It is now read-only.

Print statements don't show up until program terminated #150

Open
ishaan-mehta opened this issue May 24, 2020 · 1 comment
Open

Print statements don't show up until program terminated #150

ishaan-mehta opened this issue May 24, 2020 · 1 comment

Comments

@ishaan-mehta
Copy link

ishaan-mehta commented May 24, 2020

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):
image

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!

@dseynhae
Copy link

dseynhae commented Aug 12, 2020

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...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants