All Questions
Tagged with vscode-tasks visual-studio-code
535 questions
0
votes
1
answer
26
views
How to run typescript command in vscode tasks?
Can't run a command in tasks for current file:
{
"version": "2.0.0",
"tasks": [
{
"label": "the task",
"type": "...
0
votes
0
answers
12
views
Run VSCode task inside WSL and windows sequentially
Configured WSL to successfully compile my framework there.
I've installed VSCode in Windows with WSL integration extension.
With shell task type I successfully can trigger building framework from ...
0
votes
1
answer
29
views
Create a shortcut to open multiple files and keep them open in Visual Studio Code
I have a task that I do several times a day everyday that requires editing 20 files (spread out in different places throughout my project), keeping them open since editing each file mostly requires ...
0
votes
0
answers
13
views
VSCode tasks that automatically kills all other tasks on invoke
When using vs.code, I have to use a non-standard compiler, and it's easier to just run it from Makefile. I have it set up as a task in tasks.json. I am trying to make my postDebugTask remain in ...
0
votes
1
answer
92
views
VS Code Debug Extension: Problem to get the vscode-mock-debug project running
I wanted to follow the steps in Development Setup For Mock Debug. After I run the Extension launcher (F5) there were plently errors being thrown in my face:
Error 1:
Error 2:
Therefore, debugging ...
0
votes
1
answer
54
views
dependsOn clause conditonal to input variable in Visual Studio Code tasks
I want to define configurable tasks with Visual Studio Code, by defining some input variables.
In my particular case I want one task to depend on the value of the ${input:package_manager} variable ...
0
votes
0
answers
33
views
How to combine vscode tasks of sub folders in a multi-root workspace?
I have a setup where multiple projects are depending on outputs of each other, each project is independent (so it owns its own tasks).
I want to create a Meta Task, which will build project a and ...
0
votes
0
answers
14
views
How can I bypass an input prompt for an extension command in VS Code when running the command as part of a task?
I'm trying to automate the process of turning a Dendron note into a pdf.
Since there isn't currently native support for exporting to pdf, I'm using pandoc to convert markdown to a pdf.
However, before ...
1
vote
0
answers
27
views
How to see Google test output from a remote machine in the test explorer instead of the terminal in VSCode
Currently I am able to run Google-Tests in VSCode and see the results in terminal panel. I want to know how, if at all, can I see those results in the test-explorer?
In my current setup on Ubuntu-20....
1
vote
0
answers
60
views
vscode disassembly view displays nothing but ?? bytes
I am trying to debug my c++ program running on bochs by vscode. However, when I try to open the disassembly view, it displays nothing but ?? bytes.
However, I am able to see the disassembly codes by ...
0
votes
1
answer
72
views
how to do something after kill terminal in vscode
When I run a task in vscode, how can I execute specific commands after I click the delete button(kill terminal)
for example.
when I run task A in vscode, I want to modify a charcater in a file with ...
0
votes
0
answers
23
views
VSCode shows a warning in a task definition when I use "linux": "command"
I am running VSCode on an Ubuntu 22.04 host that is up to date with patches.
I am creating custom tasks. VSCode shows these warnings for each of the tasks in the PROBLEMS window.
Missing property &...
0
votes
0
answers
104
views
Parse Error on VS Code tasks.json when trying to execute a Python command
I have a custom pip package installed in the standard 'site-packages' path.
I would like to execute one of the Python files within that folder via a Task in VS Code tasks.json.
Since I do not want to ...
0
votes
1
answer
38
views
Is there a way in VS Code to launch two python files and then automatically display them both side by side?
I'm trying to create a launch.json configuration that will run two python files and then show the two terminals side-by-side. It's easy to do manually but I can't figure out a way to automate it.
The ...
0
votes
0
answers
157
views
Run background task in vscode
I have a bash script that starts elasticsearch (./scripts/dev/start_elasticsearch.sh).
if I launch this script in a normal shell and at the end of it I close the shell Elasticsearch will still run in ...
0
votes
0
answers
16
views
VSCode non-terminating task before debug
For a little project, I'm using VSCode. To test email outputs, I use a script that just logs incoming SMTP messages.
Now, I'd like to start this script before launching debug. But using "...
0
votes
0
answers
33
views
How do I automatically connect to a docker on remote server when I open VSCode
At the moment for my personal setup:
The VSCode window that I never explicitly quit, I use it to first SSH to the remote server.
With the docker extension I then go ahead and attach the container to ...
0
votes
1
answer
208
views
VSCode: How to configure tasks to open browser after server task is ready
I am writing documentation on my project using mkdocs. I would like to automatically run mkdocs serve (compiles the docs and runs local web server) and open browser window(simpleBrowser.show).
The ...
0
votes
1
answer
33
views
vscode task checking for existence of environment variables
I want to create a vscode task that runs when I open a folder with vscode. The task checks for existence of an environment variable. If it exists, then do nothing, but if it does not exist, then the ...
1
vote
0
answers
88
views
Run VSCode task as another user
I'm running a simple script in a VSCode task like this:
.vscode/say_hello.sh:
echo Hello World, this is $(whoami)!
.vscode/tasks.yaml:
{
"version": "2.0.0",
"tasks&...
1
vote
1
answer
154
views
Is there a way to get tasks in VSCode to automatically run when connecting to a new branch and not just when opening the project folder?
I've successfully automated the running of tasks (./.vscode/tasks.json) when I open the project folder. But is there a way to automatically run that script of tasks when connecting to a new branch? I'...
0
votes
0
answers
70
views
Automating (activate Python virtualenv) with visual studio task does not work
I have a .env in workspace VSCODE with the following code:
echo "The .env file was triggered."
source ~/.local/bin/virtualenvwrapper.sh
workon app_3.12_virt_env
when I execute this file ...
0
votes
0
answers
27
views
How can I view/kill vscode "launch" processes?
I guess I keep coming into some weird state where the run crashes but vscode "launch" is still running for some reason, and I don't want to kill the whole program to get rid of that process. ...
0
votes
1
answer
64
views
Input not prompted for VSCode custom task
Moving to using VSCode under CentOS 7.
With the following tasks.json under ${workspaceFolder}/.vscode:
{
"version": "2.0.0",
"tasks": [
{
&...
0
votes
1
answer
214
views
Attach a debugger to a flask process started by tasks.json in vscode
I have the following tasks.json in my workspace:
{
"version": "2.0.0",
"tasks": [
{
"label": "Run Locally",
&...
0
votes
0
answers
35
views
vscode uses different cocoapods version when running a task
When I run pod --version from vscode terminal or macos integrated terminal I get version 1.13.0 which is a "correct" version for me, but when I run the same script as a vscode task I get 1....
0
votes
0
answers
53
views
Faster tasks.json in VSCode?
My goal is to configure VSCode to open a panel (or other certain tabs) upon startup, specifically when not opening a workspace (i.e. simply click on vscode icon and open the vscode app; basically I ...
0
votes
0
answers
28
views
Passing build arguments in test context vscode
What is the way to pass extra argument to the test context in VS Code?
It is quite straightforward for task:
"args": [
"build",
"${...
0
votes
0
answers
70
views
VS Code: Options parameter in tasks.json not able to change env variables?
I have the following tasks.json file with the options declared in the windows section
{
"version": "2.0.0",
"tasks": [
{
"label": "Bazel ...
0
votes
0
answers
30
views
How to check a directory is opened in VS Code?
I want to make a "simple" project management system.
The targeted concept:
The app asks for a project name (which same as the directory name)
The app creates that directory in a predefined ...
0
votes
2
answers
192
views
how to run a pre-configured command when new terminal is created in vs code for only opened folder
Actually the problem I'm having right now is same as Process terminated. Couldn't find a valid ICU package installed on the system in Asp.Net Core 3 - Ubuntu.
To solve this, I need to run export ...
0
votes
0
answers
40
views
Execute commands after connection to remote SSH terminal
I am using VSCode Remote - SSH Connect To Host.
I've tried to use tasks to execute commands after connect but it spawns a new shell.
How can I execute arbitrary shell commands on the remote shell ...
0
votes
1
answer
41
views
VS code:tasks.json, the ";" symbol is interpreted as "';'" into the terminal
After installing VS Code Version: 1.85.2 (Universal), the ";" symbol in the line of arguments(args) is interpreted into the terminal as "';'". Consequently, after running c++ file ...
0
votes
1
answer
179
views
Is it possible to get the currently selected directory of the vs code explorer as a variable?
The Goal
I'm trying to get the currently selected directory path in vscode as a variable from inside my tasks.json like below:
{
"label": "Echo selected directory from explorer&...
0
votes
0
answers
222
views
With MSVC build tools setup with vscode, how to have the *.obj and .pdb files be generated in separated directory?
Currently they generate under workspace folder. The built binary successfully builds in build folder with my tasks.json but how do I achieve the same for the obj and .pdb files. I tried doing that ...
1
vote
0
answers
209
views
Environment Variable setup for plugin "Gradle for Java"
We use "Gradle for Java" plugin in VSCode to list down all the Gradle tasks in our Project. The main gradle file uses multiple environment variables like below,
providers.environmentVariable(...
0
votes
2
answers
1k
views
VS Code Problems tab: Clear items coming from tasks with problemMatcher
I have a few VS Code tasks with a problem matcher. When I run them, they work as expected, i.e., (re)populate the Problems tab with messages accordingly. Owner is always set.
However, is there a way ...
0
votes
1
answer
129
views
VS Code save before build task does not trigger format on save
Has anybody managed to successfully combine save before build and format on save in VS Code?
(i.e. running a build task both formats and saves a file before building, either from the Run menu or by ...
1
vote
1
answer
155
views
How to redirect the output of a batch script to Visual Studio Code's integrated terminal?
I have a Visual Studio Code task that executes a batch script using the following code:
{
"version": "2.0.0",
"tasks": [
{
"label": "...
0
votes
1
answer
717
views
configure C++20 in VSCode [duplicate]
I tried to set vscode with C++20, but I did not succeed. I admire your helps.
here is my programme. It includes C++20 specific commands. Also the last command gives the version of C++ it is using.
//...
0
votes
0
answers
255
views
How to set vscode terminal charset(for decoding) to GBK, or set vscode gcc build task use "-fexec-charset=UTF-8"
When i use the button "run C/c++ file" to run a ".c" file, and i got wrong characters in my terminal(default by powershell).
all is on windows 11
the .c file is utf-8 format
after ...
1
vote
0
answers
185
views
In VS code how to automate a key press of keyboard for any command on terminal
After running a task which runs "npx react-native start" on terminal
Then i see metro logo with instruction and I have to press "a" key for android. So rather pressing key manually ...
2
votes
1
answer
183
views
How to keep double quote in here-string for powershell in vscode task
Steps to Reproduce:
add the task below to task.json
Run task
The expected output is abcd "abcd", howerever, it print abcd abcd in task terminal
Actually, I want to use $selectedtext in ...
0
votes
1
answer
63
views
There is any way to run task directy, with skipping task prompt?
Like in title, is there any way to run task with skipping task prompt?
My keybindings.json, and tasks.json:
{
"key": "f4",
"command": "workbench.action.tasks....
0
votes
0
answers
90
views
Is there a way to launch a debugger with a set up launch,.json from inside a vscode task.json?
I currently have a few steps of tasks chained together that builds and deploys a server for my Java application. Currently, I can run the debugger either by:
Selecting the debugger from the dropdown ...
-1
votes
1
answer
86
views
After deleting the wrong content, it will still be marked in red until compiled again
There is something wrong with my vscode.
When a compilation error occurred, I corrected the error, but the correction will not be reflected in the red mark untill compiled again.
g++ version 13.1.0
...
0
votes
1
answer
600
views
【tasks.json】 How to get the path of the currently selected folder in the side bar in VSCode
"tasks": [
{
"label": "Create_Folder_and_Markdown_File",
"type": "shell",
"command": "touch \"${workspaceFolder}/${...
0
votes
0
answers
268
views
Vscode run build task not working... it begins but never ends
i have a problem with build function in vscode (language C) because when i click on "run build task", "debug C/C++ file" or "Run C/C++ file" vscode starts building my ...
-1
votes
1
answer
77
views
VS Code uses diffrence C++ version when "Run Code" and "Run C/C++ FIle" I want both items uses c++ 17 [duplicate]
As you can see, When I hit "Run code", VS Code compiles the C++ file and runs it immediately in the terminal. All of this is good with one problem: it uses C++ 98.
But when I hit "Run C/...
0
votes
0
answers
163
views
VSCode settings not taking effect randomly in multi-root workspaces
I am using VSCode to work within a monorepo structure using workspaces. The root contains a .code-workspace file with some settings configured and projects are defined as their own workspaces and ...