apommel / vscode-matlab-interactive-terminal

VS Code extension allowing for an interactive Matlab terminal and launching of scripts through Matlab Engine for Python
MIT License
46 stars 10 forks source link

Outputs are displayed all at once when the program is completely over. #44

Closed somso2e closed 2 years ago

somso2e commented 2 years ago

Here's an example:

for j = 1:10
    fprintf("%d\n",j);
    pause(1)
end

The expected behavior is numbers being displayed one by one with a 1-second delay. But what ends up happening is all of them are displayed at once after 10 seconds.

system config: Matlab Interactive Terminal v0.4.0 Python 3.8.0 64-bit MATLAB R2020b

apommel commented 2 years ago

It is a well-known behavior (see #9). Try turning off "Unicode Switch" in the settings, and you should be able to see real-time output. Obviously, you will then be unable to see unicode characters in MATLAB output.