Create run/debug configuration for node js

I'm new to webstorn. I'm migrating from vscode and I have a configuration to run through evscode debug and I want to implement it for webstorn.
How do I create a configuration in webstorn like the one in vscode below?

 

{
  "name": "API APP",
  "type": "node",
  "request": "launch",
  "runtimeExecutable": "node",
  "runtimeArgs": [
    "--nolazy",
    "-r",
    "ts-node/register/transpile-only"
  ],
  "args": [
    "src/app/index.ts"
  ],
  "cwd": "${workspaceRoot}",
  "internalConsoleOptions": "openOnSessionStart",
  "skipFiles": [
    "<node_internals>/**",
    "node_modules/**"
  ],
  "preLaunchTask": "prepare",
  "envFile": "${workspaceFolder}/.env"
},
0

It can be something like this:

Working directory here is the same as cwd in VSCode, Before launch can be used to specify the preLaunchTask. Note that args is normally mapped to Application parameters, but in your case the JavaScript file seems to be the better choice.

There is no filed to specify the .env file, loading environment variables from the file is not supported; you can add all your variables in the Environment variables field.

0

请先登录再写评论。