create a run/debug configuration for the following json

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "request": "launch",
            "name": "Debug TypeScript",
            "runtimeExecutable": "node",
            "runtimeArgs": [
                "--loader",
                "ts-node/esm"
            ],
            "args": ["${workspaceFolder}/src/main.ts"],
            "sourceMaps": true,
            "cwd": "${workspaceFolder}",
            "console": "integratedTerminal"
        }
    ]
}

This is my launch.json in VSCode. I want to create similar configuration for Webstorm run/debug configuration too. Can someone help me with it? 

 

0

It can be a Node.js run configuration like this:

 

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

0

/usr/bin/node --loader ts-node/esm /home/diptanshu1044/projects/economyBot/src/main.ts

Process finished with exit code 135 (interrupted by signal 7:SIGBUS)
I am getting this error

0

But the configuration is equal to the one you use in VSCode, does it work for you there? What is a result of running the same commend (/usr/bin/node --loader ts-node/esm /home/diptanshu1044/projects/economyBot/src/main.ts) in terminal? Can you run with --report-signal=SIGBUS --report-on-signal (https://nodejs.org/dist/latest-v15.x/docs/api/cli.html#cli_report_on_signal) that may capture a stack trace?

0

请先登录再写评论。