''Run code' is not working in Visual Studio Code
When I click 'Run code' on the top right corner, or right click then click 'Run code', or use Ctrl+Alt+N, the integrated terminal does not appear and code could not run.
However, I can open the integrated terminal in vscode under View, and able to run code there using commands.
I believe my setting is correct as following. The problem happens suddenly, regardless of language.
"terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\cmd.exe",
"code-runner.runInTerminal": true,
So How do I solve this to enable running code directly?
Solution 1:[1]
I had the same problem, and solved it by adding:
"folders": [
{
"path": "."
},
],
to my code-workspace file
Solution 2:[2]
I also had the same problem, look how I had solve this problem with the help of my friends (Dipesh and Vinit).
Steps:
- Open VS code
- On the left bottom-corner click on Manage and go into the settings.
- In the search settings type code runner, scroll-down and put tick-mark in 'Run In Terminal'.
After that check by running your code.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Watusimoto |
Solution 2 | Anand Patel |