Questions tagged [vscode-code-runner]

Code Runner is an open-source extension for Visual Studio Code. It enables you to run a variety of languages in Visual Studio Code, with support for every popular programming language including both legacy languages and those that have gained popularity in recent years.

Code Runner is a free, open-source extension for Visual Studio Code.

It enables you to run a variety of languages in Visual Studio Code, with support for every popular programming language including both legacy languages and those that have gained popularity in recent years: C, C++, Java, JavaScript, PHP, Python, Perl, Perl 6, Ruby, Go, Lua, Groovy, PowerShell, BAT/CMD, BASH/SH, F# Script, F# (.NET Core), C# Script, C# (.NET Core), VBScript, TypeScript, CoffeeScript, Scala, Swift, Julia, Crystal, OCaml Script, R, AppleScript, Elixir, Visual Basic .NET, Clojure, Haxe, Objective-C, Rust, Racket, AutoHotkey, AutoIt, Kotlin, Dart, Free Pascal, Haskell, Nim, D.

Resources

240 questions
2
votes
1 answer

VS Code cant run C/C++ in integrated Terminal

So I am trying to Setup C/C++ in VS Code. I installed mingw, the C/C++ Extension in VSCode and Code Runner Code Runner has the following Setting turned on: RunInTerminal This is the Code I try to run: #include int main() { int age; …
2
votes
1 answer

How can I configure the VS Code Code Runner extension to use the Microsoft Visual C++ Compiler?

I wanted to know how I can set the code runner extension to use the Microsoft Visual C++ compiler. By default, trying to run the code throws an error as it is set to use the g++ compiler.
Mohammad Ali
  • 117
  • 5
2
votes
2 answers

Code Runner does not work for Python in VsCode

I can run python files in cmd promt and Vscode terminal (cmd prompt). When I try to run any programme with Code runner ("code-runner.runInTerminal": false), I get the following error: [Running] python "c:\Users\MY PATH INCLUDING…
Samuel Saari
  • 1,023
  • 8
  • 13
2
votes
1 answer

how to debug 'extern' in c with vscode

I'm not familiar with c compiler,I know how to use gcc or g++ in terminal I have main.c #include int count; extern void write_extern(); int main() { count = 5; write_extern(); } support.c #include extern int…
John
  • 645
  • 1
  • 8
  • 23
2
votes
1 answer

Showing elapsed time in VS Code terminal

When I was executing my python code with code-runner, it showed the result in the "Output" with the elapsed time. [Done] exited with code=0 in 179.605 seconds I switched to using the terminal and I no longer know how long my program took to…
typhon04
  • 2,350
  • 25
  • 22
2
votes
2 answers

How to add a flag when running Code Runner in VSCode

I would like to add the flag -std=gnu++17 when running vscode-code-runner. I try to change the settings.json file using the settings tab in VSCode, but that does not seems to work. Here is the settings.json I used: { …
2
votes
1 answer

VSCode SyntaxError: Unexpected identifier on es6 imports

I am getting this error when running a javascript file from inside using code runner. (function (exports, require, module, __filename, __dirname) { import Vue from 'vue' …
securisec
  • 3,435
  • 6
  • 36
  • 63
2
votes
2 answers

'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…
Jeffrey
  • 184
  • 1
  • 1
  • 9
1
vote
1 answer

Using Boost Library in Visual Studio Code with Code Runner

I have the program Ex_04.cpp which has this code: #include #include #include #include #define BOOST_NO_CXX11_SCOPED_ENUMS #include #undef…
1
vote
1 answer

VScode Exception occur: System.ArgumentOutOfRangeException

When I try to run any c++ program in vs code an exception occur and do not run the program Oops, something went wrong. Please report this bug with the details below. Report on GitHub:…
mestu
  • 46
  • 2
1
vote
1 answer

Can't find run button in vs code with only my javascript project

I've reinstalled Code runner for several times and I've test with many languages like python and c++ they are all work well (the run button on the top right corner was appear) but only for my js file the button disappear (I've tried to save the file…
1
vote
0 answers

Code runner runs javascript in terminal but does't work in otput

Hi when I try to run javascript with code runner i get only: "[Running] node "/home/lukasz/JavaScript/app.js" [Done] exited with code=0 in 0.11 seconds" without any actual output. When I switch to run in terminal everything works fine. Any ideas how…
1
vote
0 answers

Should debugger be launched always in VScode when only running a file (not debugging) using code-runner?

In a VScode C/C++ programming setup on Windows 10 system, the "C/C++ Extension Pack", "Code Runner", "WSL" extensions are installed, which use Alpine Linux target on WSL on this PC. Alpine Linux WSL instance has the gcc dev environment, build-tools,…
bdutta74
  • 2,798
  • 3
  • 31
  • 54
1
vote
1 answer

How to prevent VSCode code runner extension from opening second code terminal when I run it

Whenever I use code runner to run my python file, it always creates a second code terminal to use, and whenever I delete that terminal, it just creates another one. How can I prevent this? Its pretty annoying, I've tried looking for solutions online…
expoodo
  • 65
  • 1
  • 8
1
vote
2 answers

My icon of the coderunner in VS code is not showing

Today I installed VS code to learn python. I installed Code Runner extension and some how I disabled the 'run' icon which is shown in the top right corner. I have been trying for several hours. How can I get it back again? I tried to schange the…