Closed relifenoxiao closed 1 month ago
"The current state is that I have reset my system to the previous backup point, and everything is back to normal; the scripts run without errors. I also learned that not all configurations of VS Code are stored in the Settings. I rolled back all the recently modified configurations, but this didn’t take effect until I reset my system."
I am glad you were able to resolve the issue. It sounds like the file was not on the path. This could be verified by running ">> which do" and seeing what file, if any, is being reported.
which do
has the same output as the pwd
command, which matches the file path I mentioned earlier when it couldn't run.
Both are located in MATLAB's search path. However, just because they are the same now doesn't mean the output was the same when I ran the script earlier.
Perhaps pwd
shows the location of the terminal I opened, while the terminal executed the file from a different location.
But the script is indeed located in the path shown by the previous pwd
command.
This is puzzling because it happens inconsistently. Since I am not familiar with the which do
command, I'll leave it to you to judge.
No Response After Clicking the Run Button
As mentioned, I found that there was no response after clicking the run triangle. This issue occurs frequently, and whenever it happens, a prompt appears in the lower right corner asking me to add the current script to the MATLAB search path. After clicking "Add to Path," the script can run. However, as shown below, my script is already in the MATLAB search path, so I thought this should not be an issue and disabled the prompt.
After losing this warning, I found that I could no longer run any scripts. I can still run commands in the terminal.
To resolve this issue, I tried the following methods:
Uninstalling and reinstalling the extension, and confirming that I had enabled the visual options, but I did not regain the original warning prompt, nor could I run scripts.
I suspected that the settings might be in VS Code, so I rolled back my
settings.json
file, but there was still no change.Attached is the content from the
Output
, but this should be unrelated to running the script:My Request
I am currently unable to resolve this issue and cannot determine if it is a bug. Please guide me or tell me how to fix it.
My device is: