简体   繁体   中英

Visual Studio Code wont run code and gives no error message

So when running any code, no matter the language visual studio ignores the code and just doesn't run. all i see is it skips to the next line in the terminal and gives no output. Not even something like hello world runs. It gives no error message whatsoever, just doesn't run.

Ok, so i switched to Microsoft Visual Studio 2019, instead of Visual Studio Code, and that fixed the issue so now i don't have to worry about extensions.

I had the same issue, running code in any language would cause it not to run, but no error message was produced. I eventually opened up developer tools and saw that no extensions were loading, somewhere the path got corrupt.

I fixed the issue by uninstalling each extension, uninstalling VS Code, deleting the extensions out of the folder they live in, then reinstalling VS Code and the extensions.

After that they ran fine.

While a full reinstall is not ideal, this was the only method I could find to fix it. There is not much info on this issue online, so I'm adding my experience and the fix that worked for me.

I also had the same problem. I uninstalled and reinstalled mingw and vs code both but nothing happened. Even i uninstalled and reinstalled code runner extension as well.

But what worked for me is going to extensions menu then selecting code runner extension and in extension settings select the checkbox- Run In Terminal.

It should help in case it is not working for code runner extension.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM