visual studio code - Passing arguments to C++ programme for debugging in VSCode -


i want debug c++ project in vscode (on mac, using either gdb or lldb). program takes command line arguments like

./prog -input cf file_x.txt 

this works fine when starting debugging session in gdb on command line.

in vscode, tried adapt launch.json read (only relevant lines shown):

"program": "${workspaceroot}/build/prog",             "args": [               "-input cf",                "path_to/file_x.txt"             ] 

with this, @"unknown option: \"-input cf\"\r\n" in output , process not debugged; alternatively, tried 1 argument so:

"program": "${workspaceroot}/build/prog",             "args": [               "-input cf path_to/file_x.txt"             ] 

resulting in same message. have missed important?

try

"program": "${workspaceroot}/build/prog",             "args": [               "-input",               "cf",               "path_to/file_x.txt"             ] 

Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -