Auotomate VS Code Run Tasks through command line - visual-studio-code

I am using Visual Studio as my IDE. I have multiple run tasks defined in launch.json which I can run it from Run/Debug menu.
I want to run few specific tasks in some order from launch.json very frequently,
So If there is any way to achieve this via command line or aggregrate those tasks into a new launch file and run it.
Any thoughts how can I achieve this?

Related

In visual studio code is there a way to add launch profiles from launch.json to the command palette?

I use visual studio code and have several "launch profiles" defined in launch.json to do different things such as run specific scripts or tests or run in specific modes. I'd like to be able to execute these from the command palette. At the moment I have to go to the "run" tab on the left and then select from the drop down each time I want to change what I'm running. This is quite cumbersome when I want to run different modes. So I'd like each launch profile to be an option from command palette.

How to execute a npm/yarn script when testing a VSCode extension?

I'm writing a VSCode extension which I bundle with esbuild, as suggested in VSCode docs. Following the docs, I added new script entries in my package.json, including:
"esbuild": "yarn run esbuild-base -- --sourcemap"
Now I must run yarn run esbuild, then hit f5 each time I want to test my extension. This is a source of confusion, because if I forget the first part, I'm going to test my old code.
To avoid this I wonder if it's possible to automatically run yarn run esbuild when I press f5.
Create a task to perform the yarn call
add this task as a preLaunchTask to your debug launch config
Or maybe you can setup an npm-watch script

Run a local command before starting eclipse debugging

I want to run a terminal command just before a debug configuration starts on Eclipse.
I heard about CDT launch Groups, but couldnt get around it fully. I need to just run a normal terminal command, nothing fancy.
The aim is to copy some stuff over to the execution path before actually starting the debugging.
I managed to do this via "Launch Groups" in the CDT. Creating 2 groups, one as a c/C++ Application which calls a shell script that includes the command I want to run. And then the normal debug configuration I wanted to execute.

Is it possible to consecutively debug configurations in VSCode

In VSCode, I would like to automate the debugging of node scripts consecutively instead of manually selecting configurations. In the terminal, one would run node program1.js && node program2.js. Is this possible?
There is a package called concurrently if you want them to run in parallel

WebStorm run npm script in tool window (Protractor)

I would like to be able to run an npm script in the Protractor tool window rather than npm. This is easily doable creating a new Protractor Run/Debug config but I need to add a command line argument which the Run config doesnt currently support.
More specifically I am trying to run
protractor --capabilities.chromeOptions.args=--headless --capabilities.chromeOptions.args=--disable-gpu
Would like to do this without modifying the protractor config file.
Essentially, I want to be able to do this without having to provide multiple config files in my project. One for headless, one without.
There is currently no way to specify cmd options in Protractor run configuration, please follow WEB-25165 for updates