You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The input command in the MATLAB extension for Visual Studio Code is not working, and as a result, all functions and scripts that require user input do not function as expected.
To Reproduce
Open a MATLAB script in Visual Studio Code.
Add the following code to the script:
Enter the following withdrawal = input("Enter the amount you'd like to withdraw\n> "); fprintf("You want to withdraw %d", withdrawal)
Run the script using the MATLAB extension.
Expected behavior
The script should display the prompt message "Enter the amount you'd like to withdraw" and wait for the user to input a value. It should then print the entered value.
Screenshots
When running the script, the cursor blinks but nothing happens when the user enters a value and presses Enter. When the user presses Ctrl+C to terminate the program, the following error is displayed:
Useful Information
OS Version: Windows 11 Version 23H2 (OS Build 22631.3447
VS Code Version: April 2024 (version 1.89)
Additional context
Cursor blinks also when you enter input command directly into the command prompt:
The text was updated successfully, but these errors were encountered:
Thank you for reporting this issue. This is something I can reproduce. As of right now interactive command window workflows such as input, more, pause, etc. are not supported by the extension. However, this is definitely something that we will be working on resolving in a coming release.
Thank you for acknowledging the issue and confirming that it can be reproduced. I'm glad to hear that you're actively working on resolving the lack of support for interactive command window workflows in the extension. I look forward to the forthcoming release that addresses this limitation. If there are any workarounds or updates in the meantime, please keep me informed. Thank you for your attention to this matter.
On macOS Ctrl+C doesn't seem to be captured when it's waiting for pause/input. The only way I've found to interrupt it is to look up the process and issue an interrupt ("ps -ef | grep -i matlab" to find the pid, and "kill -2 pid" to send the interrupt signal).
Hi, I spent quite some time trying to figure out why my script is not running, only to discover from this Github page that input functions are not supported. Would you mind adding something that prints an error into the Matlab terminal that the function is not supported? This would have saved me some time troubleshooting today.
Describe the bug
The input command in the MATLAB extension for Visual Studio Code is not working, and as a result, all functions and scripts that require user input do not function as expected.
To Reproduce
withdrawal = input("Enter the amount you'd like to withdraw\n> "); fprintf("You want to withdraw %d", withdrawal)
Expected behavior
The script should display the prompt message "Enter the amount you'd like to withdraw" and wait for the user to input a value. It should then print the entered value.
Screenshots
When running the script, the cursor blinks but nothing happens when the user enters a value and presses Enter. When the user presses Ctrl+C to terminate the program, the following error is displayed:
Useful Information
Additional context
Cursor blinks also when you enter input command directly into the command prompt:
The text was updated successfully, but these errors were encountered: