2

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?

SSteve
  • 10,550
  • 5
  • 46
  • 72
Jeffrey
  • 184
  • 1
  • 1
  • 9
  • The 'Run Code' command works for me using python. A python script is open in the editor window. I click on that area and then click the 'Run code' icon on the top right and it executed fine. – Natsfan Jun 09 '18 at 01:36

2 Answers2

2

I had the same problem, and solved it by adding:

"folders": [
    {   
        "path": "."
    },
],

to my code-workspace file

Watusimoto
  • 1,773
  • 1
  • 23
  • 38
0

I also had the same problem, look how I had solve this problem with the help of my friends (Dipesh and Vinit).

Steps:

  1. Open VS code
  2. On the left bottom-corner click on Manage and go into the settings.
  3. In the search settings type code runner, scroll-down and put tick-mark in 'Run In Terminal'.

After that check by running your code.