atom-shell-commands icon indicating copy to clipboard operation
atom-shell-commands copied to clipboard

Flushing stout

Open dnaxxx opened this issue 8 years ago • 5 comments

I'm using atom shell commands to run the php interpreter with x-debug. If I run the the program step by step the echos don't show up on the shell immediately. Instead, multiple lines are buffered and flushed only when the program terminates or a var_dump is executed. I'm not sure if this issue depends on PHP, because on bash the echos are shown at every step.

dnaxxx avatar Dec 05 '16 09:12 dnaxxx

in C there is a 'flush' you can search something similar to it in php

skywind3000 avatar Dec 05 '16 10:12 skywind3000

Thank you but I've already tried all the tweaks I could.

Refs: http://stackoverflow.com/questions/3133209/how-to-flush-output-after-each-echo-call http://manzzup.blogspot.it/2013/11/real-time-updating-of-php-output-using.html

dnaxxx avatar Dec 05 '16 10:12 dnaxxx

http://php.net/manual/en/function.flush.php will this help ?

skywind3000 avatar Dec 05 '16 14:12 skywind3000

No, it doesn't.

dnaxxx avatar Dec 05 '16 16:12 dnaxxx

skywind3000's package only updates the output after every newline character. If PHP doesn't print that character until a var_dump then the buffered output (which could be a single wrapped line) would not display until the next line. My fork of this project should fix your issue.

dqsully avatar Mar 20 '17 03:03 dqsully