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

Can I use multiple different commands for a single file type with the Code Runner extension?

"code-runner.executorMap": { "cpp": "cd $dir && g++ -Wall -Wextra -O2 -std=c++14 $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt" }, Coderunner has a command to run .cpp code, but if I want to use another command, such as adding " <…
ElfIv
  • 21
  • 2
2
votes
1 answer

Run specific file always vscode-code-runner

Is there any setting for vscode-code-runner to setup a file that would be always run when I click on run button regardless which file is open in editor currently.
Abdul Saqib
  • 129
  • 1
  • 4
2
votes
1 answer

VSCode opening output tab automatically when I typing code

during typying code and auto save in vscode, output tab automatically running. It's so uncomfortable. is there are anyone who give me some help? I've been trying to my self but I didn't find solution
오상욱
  • 21
  • 1
2
votes
0 answers

ld: symbol(s) not found for architecture x86_64 (run C++ on VS code)

I am creating a simple C++ project of the relationship between points and a circle in VS code (macOS Version 12.1). My code worked well if I declared and defined Point and Circle classes within the main script. However, when I declared and defined…
Cyan
  • 319
  • 2
  • 8
2
votes
1 answer

Why Code Runner always open other terminal in VSCode when I execute Python? And how to fix it?

Even though there is already a terminal open, when I run Python code using Code Runner (ctrl + alt + n), in VSCode it always opens another terminal. And it's no use closing the old one, because it opens again. This is my configurations for…
M.F
  • 45
  • 7
2
votes
1 answer

Code Runner in vsCode ignoring my compiler arguments in my tasks.json file

I am using vsCode with the C/C++ extension and code runner. I want to compile with a -DLOCAL flag so that I can do #ifdef LOCAL ... #endif The problem is that when I compile my code with the code runner extension, it seems to ignore that flag and…
2
votes
0 answers

Code-Runner Extension Refuses to Use the Correct Environment

I'm having a bit of trouble getting code-runner to play nice with my conda environments. Checklist; The correct python interpreter is selected. I've explicitly changed the pythonPath and executorMap objects in the settings.json file to the correct…
2
votes
1 answer

Change the version to Python 3 in Virtual Studio Code (VS Code) if Code Runner uses older version like python 2 (Q+A)

I use the extension code-runner for my VS code to run it directly in the app without a terminal and I had a problem where I had the latest version of Python installed (3.10.0) I had selected that version as my interpreter yet code-runner was running…
2
votes
2 answers

How to remove the file path from terminal while running a code in visual studio code (mac os )?

How to remove the file path from terminal while running a code in visual studio code ? Im using visual studio code with CodeRunner extension in Mac air M1. I’ve tried to play with the terminal settings and I couldn't find the one that remove this. I…
2
votes
2 answers

Where can I find settings-variable-reference visual studio code documentation ? (e.g : $fileName, $fileNameWithoutExt)

I'm using the Code Runner extension in vs code, I want to change the output directory of compiled-cpp (.exe) files but I don't know what variable-name I will type in my "settings.json" file : "code-runner.executorMap": { "javascript":…
Bongcoy
  • 33
  • 3
2
votes
0 answers

How can I stop Code Runner running certain languages?

I am a big fan of Code Runner, and I'd like to use it to run Visual Basic scripts, since there seems to be no VB runners out there. But, I already use and love Microsoft's Python extension, and that allows me to run Python. If I install both, when I…
SamTheProgrammer
  • 1,051
  • 1
  • 10
  • 28
2
votes
0 answers

Need only 1 run option in vscode Python

Need help with running code in vscode. As you can see in the image, if I click on the run button, 2 options are coming. I need to remove 1 option so that I can run code with a single click. Note that I am using the code runner extension.
2
votes
3 answers

How to remove "Running" and "Done" information in VS Code

Since I'm new to VS Code and I haven't found an answer to it yet, I'm posing the following question: I installed the Code Runner extension and whenever I'm running my code, I get the output [Running] python -u "/Users/XYZ/ML/main.py" Hello…
kallikles
  • 83
  • 1
  • 2
  • 6
2
votes
1 answer

How to compile a C program that includes `math.h` using vscode code-runner extension?

Is there a way to compile a C program that includes math.h using the vscode code-runner extension? I know that the program can be compiled by appending -lm option at the end of the gcc command if I compile it in the terminal. The thing is I do not…
Sari
  • 21
  • 1
  • 4
2
votes
1 answer

How to show full object with VSCode Code Runner in the OUTPUT section?

When running JS code via Code Runner, my output is often abbreviated to [Object] and I am unable to see the full result of running a JS function. Is there a setting that allows full console logging of the full output rather than just abbreviating a…
1 2
3
15 16