0

How to pass an argument like --x 'value' or like --y=false or like --z, in your launch.json?

1 Answer 1

1

The arguments have to be provided in launch.json file. There is a field called args which parameters to be passed. If you have to pass an argument like --x 'value' or like --y=false or like --z, edit your launch.json and in the arg field add your parameter like this-

        {
            "name": "(gdb) Launch",
            "type": "cppdbg",
            "request": "launch",
            "program": "path of the exe",
            "args": [ "--x", "value" ,"--y=false", "--z"],
            "stopAtEntry": false,
            "cwd":  "current working directory",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
        }
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.