paulo-fernando-silva / vscOctaveDebugger

MIT License
35 stars 4 forks source link

plot not working #21

Closed micharaze closed 5 years ago

micharaze commented 5 years ago

When starting the code, no plot is displayed:

[X,Y] = meshgrid(-8:.5:8);
R = sqrt(X.^2 + Y.^2) + eps;
Z = sin(R)./R;
mesh(X,Y,Z)

Works only if i add an pause to the end.

VS Code version: 1.28.2

paulo-fernando-silva commented 5 years ago

Hey Michael, If that's the entire program then yes. The debugger will be killed before the plot is finished. That's by design. If I don't kill the process on exit they you would have to kill it yourself. In my opinion I prefer to have the debug session cleanup after itself. If you want to see the plot you could add a waitforbuttonpress; as the last line of the program. I could add a flag to the launch.json to prevent the extension from killing octave on exit. But the work between setting that in your launch.json versus just using waitforbuttonpress; doesn't seem to be worth it.

micharaze commented 5 years ago

Thanks for the fast response!