mathworks / MATLAB-extension-for-vscode

This extension provides support for editing MATLAB® code in Visual Studio® Code and includes features such as syntax highlighting, code analysis, navigation support, and more.
https://marketplace.visualstudio.com/items?itemName=MathWorks.language-matlab
MIT License
215 stars 13 forks source link

Matlab formatter not working when Matlab terminal is running #111

Open hildebrandecon opened 3 months ago

hildebrandecon commented 3 months ago

Describe the bug

For long matlab files, the formatter does not finish running when the MATLAB terminal is open at the same time.

To Reproduce Steps to reproduce the behavior:

  1. Create a large .m file, start the MATLAB terminal.
  2. Try to format the file.
  3. The formatter never finishes, no error, even though terminal is not computing anything.

Expected behavior The formatter should work with the Terminal is open.

Screenshots If applicable, add screenshots to help explain your problem.

image

Useful Information

Version: 1.87.2 (Universal) Commit: 863d2581ecda6849923a2118d93a088b0745d9d6 Date: 2024-03-08T15:21:31.043Z Electron: 27.3.2 ElectronBuildId: 26836302 Chromium: 118.0.5993.159 Node.js: 18.17.1 V8: 11.8.172.18-electron.0 OS: Darwin arm64 23.4.0

Additional context Add any other context about the problem here.

philipb314 commented 3 months ago

Thanks for reporting this issue! Unfortunately, I wasn't able to reproduce this on my end, but I did have some questions that might help us diagnose this further:

  1. How large/complex is the file in question? If possible, would you be willing to share it?
  2. Does this reproduce will a simple file that contains only 2-3 lines of code?
  3. When in this state, does the command window terminal response at all if you try to run a simple command like ">> x=1"?
  4. Does this issue reproduce every time for this file, or is it sporadic?
  5. Finally, as a quick test: Close VS Code and open a fresh instance, then run a simple command like ">> x=1". Does this issue reproduce if you try to format that file now without running it first?