0

I have been able to use args from the launch.json file as described in this question post In Visual Studio Code, how to pass arguments in launch.json

But I want to pass in an argument without a value. When I call the executable in the shell, I call it with a single argument like so:

a.exe -fw

*where the fw arg prints out the firmware version. This works well, but I cannot simulate this in debug since I get an error that my arg needs to be an object.

"configurations": [
    {
        "environment": ["-fw"]
    }

This gives me an error

Incorrect type. expected "object"

But I dont want to pass in a value, it is basically just a read argument.

How do I incorporate this in my launch.json file? Thanks!

JCSB
  • 345
  • 2
  • 16

1 Answers1

0

Nevermind... I realized I copy pasted my args in the "environment" pair and not the the "args"... everything works as expected

        "args": [
            "-fw"
        ],
JCSB
  • 345
  • 2
  • 16