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

VSCode - C++ code runner doesn't work correctly when code-runner.runInTerminal is enabled

C++ Code Runner in VS Code doesn't seem to be able to build the executable correctly if the "run in terminal" option is set to be true - "code-runner.runInTerminal": true. By default, the output window is read-only, so if my C++ program has no user…
Manish Giri
  • 3,562
  • 8
  • 45
  • 81
1
vote
3 answers

F-string error in python when running on vs code

I need help in solving this problem. The screenshot below is of the code line which is giving error. It involves f-string and I am using python 3.7.6 base:conda. This is the error message that I am getting. This is the interpreter I am…
lAaravl
  • 929
  • 2
  • 9
  • 20
1
vote
1 answer

CodeRunner Error - Not activating Virtual Environment before code execution

I am facing an issue while I am running a python program using CodeRunner extension on VS Code. I am running it in a virtual environment that is already activated. I have already set this settings: I am getting this issue: It is because while…
lAaravl
  • 929
  • 2
  • 9
  • 20
1
vote
3 answers

VS Code Code Runner C++ with wrong command in terminal

I'm using Code Runner extension in VS Code to run C++ code and it's using the wrong terminal command to do so. I'm using git-bash in VS Code and Windows 10. This is the command in terminal: Douglas@LAPTOP-6BSNLLDB MINGW64 /c/path (master) $ cd…
Nii Miyo
  • 21
  • 4
1
vote
1 answer

How to run C program in Visual Studio (Mac)

so I am trying to run a C program for the first time using VS and Mac OS Catalina however I get the following error messages when trying to run: #include errors detected. Please update your includePath. Squiggles are disabled for this translation…
DreamVision2017
  • 372
  • 1
  • 9
  • 23
1
vote
1 answer

VSCode Failed to update extensions

I'm facing issue with VSCode for a while, I'm unable to detect the issue which prevent me to update Extensions Failed to update 'ms-python.python'. Failed to update 'formulahendry.code-runner'.
Anna Plym
  • 83
  • 1
  • 1
  • 10
1
vote
2 answers

VSCode Javascript - get exact local new Date() value

Currently the time on my machine is 07:55 If I console.log(new Date()) in my vscode terminal then I get the wrong time of 05:55. This is because my time zone (South Africa) is +2. So in vscode / node my new Date() is showing the universal time, not…
Paul Kruger
  • 2,094
  • 7
  • 22
  • 49
1
vote
1 answer

How do you get the Code Runner extension in Visual Studio Code to use the selected Python interpreter?

I'd like quickly run the active python file in vscode using the Code Runner extension. When I run it I get the message... Python was not found but can be installed from the Microsoft Store: https://go.microsoft.com/fwlink?linkID=2082640 I would…
GollyJer
  • 23,857
  • 16
  • 106
  • 174
1
vote
0 answers

Why won't code runner stop running at the end of my code?

If I run code in VS Code (Python), and literally just make a little print statement, code runner will print the message and then not stop after it reaches the end of the code.. which is one line. print("Hi") will run forever unless I exit manually…
ming
  • 229
  • 1
  • 9
1
vote
0 answers

How to link to GMP using C++ in Visual Studio Code's Code Runner (in Linux)?

I've been using Visual Studio Code Runner to compile C++ projects without a problem, but now I need to use the GMP backend with Boost Multiprecision Library. As I showed in a different question, I already have working code that relies only on Boost…
blipblop
  • 155
  • 1
  • 12
1
vote
1 answer

Use $dir with backslashes escaped in VSCode settings

I'm using the Code Runner for [VSCode][2] (Visual Studio Code) and I'm trying to change the run command for C++. I have the following setting in my settings.json file: // Set the executor of each language. "code-runner.executorMap": { // ... …
Ari Seyhun
  • 11,506
  • 16
  • 62
  • 109
1
vote
5 answers

Visual Studio Code Cant get output from a C# code

I'm trying to run a simple Hello World code in VSC 1.13.1. using System; public class Hello1 { public static void Main() { Console.WriteLine("Hello, World!"); } } It successfully completes execution but doesnt produce any…
ShdwKnght333
  • 300
  • 4
  • 23
0
votes
1 answer

Where does the vs-code-runner extension get the information to build and run Kotlin programs?

I have a simple main.kt file in VS Code: fun main() { println("Hello world"); } I tried pressing F5 (I have a Node background) and it says "You don't have an extension for debugging Kotlin." I installed vscode-runner by HarryHopkinson. F5 still…
Old Geezer
  • 14,854
  • 31
  • 111
  • 198
0
votes
1 answer

VScode terminal autofills input

Im currently running a python code with code runner in VScode, but when I try to run a file that asks the user for a input, the code autofills the input with a path string like pyenv shell 3.11.3 or python -u "file path". Its really annoying . There…
Ikaro
  • 35
  • 3
0
votes
1 answer

VScode Code Runner extension doing loop without asking

so, i'm a rookie and i have a simple js file to print several string without any loop. i run it by vscode Code Runner extension. and the output just looping my program over and over until nodejs turn it off. here is my code and errormessage, thx my…