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
1
vote
1 answer

Compiling and running Java code using code runner extension in VSCode

I just started learning Java and am using VS Code. For compiling and running the program I use the code runner extension and works perfectly fine for C++ and Python. But in Java the run button is not that of the extension's and the shortcut for the…
1
vote
2 answers

Can't Open File [Errno 2 ] No such file or directory

I am new to coding and trying to run a python code in VS Code using code runner but it doesn't work, I think the issue is that code runner runs C:/c/-------- which doesn't exist in my directory, but I don't know how to go about solving…
1
vote
1 answer

VS Code clear previous output before each run

Extensions installed: Python, Code Runner The problem is I was trying to enable the "clear previous output before each run setting" But when I try running a simple code the output (in terminal) becomes glitchy. The code I am running…
1
vote
1 answer

How to turn off run selected text in vscode

I want to turn off run selected text in vs code, but I don't know where's this option exactly. For example in this code: result = "Hello" print(result) If I accidentally selected the last 4 characters ult) by mouse and hit run, the output won't be…
Ahmed Osman
  • 126
  • 1
  • 7
1
vote
0 answers

Program connects to MySQL database with VScode extension coderunner but not with node/nodemon (ECONNREFUSED error)

Follow up of: ECONNREFUSED 127.0.0.1:3306 error connecting to MySQL database to NodeJS express server (w/ typescript) where I have made SOME progress by narrowing the issue down to "running the app through terminal as opposed to the coderunner…
1
vote
0 answers

How to disable expanding run button

Code runner expands run button on click (new behaviour), is there any way to set the default? (run in terminal enabled) I just need a single click to run the program. (I want Run Python file in Terminal to be default action)
Shriraj Hegde
  • 829
  • 5
  • 18
1
vote
0 answers

Integrated terminal VSCode not showing runtime after running C++ code

I am using code-runner to run C++ in VSCode. When I show the output in OUTPUT, it shows running time or allows me to know if there is any runtime error or not. In OUTPUT But when I show the output in Integrated Terminal, it does not show any…
Splash
  • 15
  • 5
1
vote
1 answer

CodeRunner Setup in VSC for Python

I've installed VSC and added to it the C/C++ and CodeRunner extensions, and it all worked perfectly. I've set CodeRunner to run in Terminal and I haven't done much else to the settings. However, I installed the Python extension now, and the…
Valy
  • 406
  • 3
  • 13
1
vote
1 answer

Visual studio coderunner extension does not work. Nothing happens when clicking on run

Coderunner extension for visual studio code used to work on my computer. Then, for no reason it stopped working. Whenever I press run, nothing happens. No execution, no output to the terminal, nothing. Absolutely nothing happens. I have searched the…
1
vote
3 answers

How can I configure VS Code to run C# with Code Runner?

My settings.json "code-runner.ignoreSelection": true, "code-runner.executorMap": { "javascript": "node", "php": "php", "python": "python -u", "powershell": "powershell -ExecutionPolicy ByPass -File", "csharp": "scriptcs…
1
vote
3 answers

Using scanf in VS Code with the Code Runner extension

I tried a very simple code of C language using scanf, and it falls into the infinite loop(or it looks like). the code is the following: #include int main(){ int input = 0; scanf("%d", &input); return 0; } I used the code…
Sunwoo Jeong
  • 87
  • 2
  • 7
1
vote
1 answer

How can I make the VS Code Code Runner Extension's Run Icon button only display for particular language modes?

For example, I'd like to prevent the "Run Code" button from appearing in the top bar specifically for .ps1 (PowerShell) files. I like using the Code Runner extension for .groovy files specifically, but don't really want the button to appear for…
Random Coder
  • 105
  • 1
  • 6
1
vote
1 answer

Visual Studio Code error while running Python code by Code Runner on Ubuntu

I changed my operating system on Ubuntu 2 weeks ago. I installed Visual Studio Code and an extension Code Runner. When i wanted to run a code i got a following information: /bin/sh: 1: python: not found I searched the internet and i found that i…
Szymon Budziak
  • 81
  • 1
  • 11
1
vote
1 answer

Compiling C Program in VS code using Code runner

I have written a simple c program and given it a name of program When The code is made to run using code runner extension it uses this kind of statement PS C:\Users\user_name> cd "c:\Users\user_name\Desktop\" ; if ($?) { gcc program.c -o program } ;…
1
vote
1 answer

Configure VS Code code runner extension to display CPP warnings

I am wondering how I could configure the Code Runner extension on VS Code (MacOS 10.15) to display warnings (i.e. -Wall?) Would there be a simple, almost permanent method so code runner will always display warnings no matter which CPP file I build?
irahorecka
  • 1,447
  • 8
  • 25