Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

the --harmony flag in the args parameter seems not to work

the --harmony flag for node in the args parameter seems not to work. I can't use fat array functions. Here part of lounch.json

"configurations": [
    {
        // Name of configuration; appears in the launch configuration drop down menu.
        "name": "Launch app.js",
        // Type of configuration. Possible values: "node", "mono".
        "type": "node",
        // Workspace relative or absolute path to the program.
        "program": "./app.js",
        // Automatically stop program after launch.
        "stopOnEntry": true,
        // Command line arguments passed to the program.
        "args": ["--harmony"],
        // Workspace relative or absolute path to the working directory of the program being debugged. Default is the current workspace.
        "cwd": ".",
        // Workspace relative or absolute path to the runtime executable to be used. Default is the runtime executable on the PATH.
        "runtimeExecutable": null,
        // Environment variables passed to the program.
        "env": { }
    }, 
    {
        "name": "Attach",
        "type": "node",
        // TCP/IP address. Default is "localhost".
        "address": "localhost",
        // Port to attach to.
        "port": 5858
    }
]

Is there a way to fix the problem myself?

like image 837
Rheinprinz Avatar asked May 04 '15 08:05

Rheinprinz


1 Answers

The "args" parameter is not for the node process, but rather arguments for the app. I was confused by this myself, the documentation should make this clearer.

See this question for a workaround: How to start nodejs with custom params from vscode

like image 94
Simon Avatar answered Oct 21 '22 11:10

Simon