VSCode with WSL - How do I use Bash for launch configurations?

I am using Visual Studio Code to develop a TypeScript Node application on Windows 10 with WSL support.

Thanks to other threads , m is almost capable of running a VSCode task using Bash on Ubuntu on Windows.

But now I am trying to do the same with the launch config. How can I make a launch configuration to use the executable node

installed in WSL instead of the one installed in Windows?

If I run this command directly in the integrated terminal, Bash works:

node src/start.js

      

But when I click " [F5]

" and run the launch configuration that runs the same file, I get the error: "Error:% 1 is not a valid Win32 application." This is because the library is being oracledb

used and compiled in Bash, not Windows.

How can I use Bash's startup configuration to start Node?

UPDATE : I opened an issue about this on the VSCode GitHub page.

+3


source to share


1 answer


Not sure if you still need help.

  • open bash outside of code vs.
  • then run the following command to install node.

    sudo apt install nodejs-legacy



and you can run node with bash in code.

+1


source







All Articles