Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code Execution Fails to Stop with CTRL+C or Terminal Kill When Printing to Terminal #175

Open
Ayham-AlAkhras opened this issue Sep 6, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Ayham-AlAkhras
Copy link

Describe the bug
The execution of code does not stop when using the CTRL+C shortcut or by killing the MATLAB terminal when something is being printed to the terminal.

Steps to reproduce:

  1. Create an infinite loop: while true; disp(1); end
  2. Press CTRL+C to stop the process.
  3. Kill the terminal by clicking the trashcan icon at the top of the integrated terminal window.

Expected behavior
Code execution should halt with the CTRL+C shortcut, and if that fails, it should stop when the terminal is terminated.

Useful information:

  • MATLAB Version: 23.2.0.2599560 (R2023b) Update 8
  • VSCode Version: 1.93.0 (user setup)
    • Commit: 4849ca9bdf9666755eb463db297b69e5385090e3
    • Date: 2024-09-04
    • Electron: 30.4.0
    • Chromium: 124.0.6367.243
    • Node.js: 20.15.1
    • OS: Windows_NT x64 10.0.22631

Additional context
This behavior seems unusual. Killing the terminal does not terminate the process. For example, with an infinite loop (while true end), closing the MATLAB terminal does not stop the execution. When opening a new MATLAB terminal, the code continues to run and can only be stopped with CTRL+C. However, in cases where output is being printed to the terminal (as described), neither CTRL+C nor killing the terminal works, and reopening the terminal becomes impossible. The only way to stop the process is to terminate the entire VSCode instance via Task Manager.

@Ayham-AlAkhras Ayham-AlAkhras added the bug Something isn't working label Sep 6, 2024
@philipb314
Copy link
Member

Thank you for reporting this issue. This is something I can reproduce and is something that we will be working on resolving in a coming release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants