Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

As described in the documentation , you need to use the args attribute. E.g.

// Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ "type": "node", "request": "launch", "name": "Debug App", "program": "${workspaceFolder}/main.js", "args": ["arg1", "arg2", "arg3"] @AwaisNasir is that suggestion for Kotlin? Or in general? In practice, I've used simple strings and not key-value pairs. Jonathan Benn Jul 2, 2021 at 12:35 @JonathanBenn I don't know about kotlin, thats the general solution, for me key value pair solution worked and not simple strings Muhammad Awais Jul 2, 2021 at 12:43 If I run this as is, I get an error: launch: property 'cwd' is missing or empty . I had to manually add this line to the launch.json to get it to work ``` "cwd": "${workspaceFolder}" ``` Raleigh L. Sep 7, 2022 at 3:36

I pass arguments by this way for the python program, it may work for nodejs:

"type": "node", "request": "launch", "name": "Debug App", "program": "${workspaceFolder}/main.js", "args": ["--arg1", "value1", "--arg2", "value2"]

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question . Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers .