Reputation: 42
I'm trying to debug a C program in VS code, the executable of which requires multiple arguments for debugging. While debugging is in progress, I see that argc = 1 under the variables section even after specifying the arguments (each argument in separate quotes) under args in launch.json (as in screenshot below). And this is resulting in exit of the program coz of a check for argc value. Did not see this issue in stack overflow so far and hence this post. Would appreciate any help to solve it.
Upvotes: 1
Views: 803
Reputation: 42
Raised this issue in VS code' github forum and they confirmed that it's not an issue with VS code but with the C/C++ extension. So, raised it in the extension's forum too, haven't heard from them yet.
Meanwhile, I updated the extension to the latest one by chance and now argc value is 4 as expected. I see some update to the IntelliSense functionality related to args in the version released 2 days back and guess they fixed the bug in this version. Hope this post helps someone working with old version and facing similar issues.
Upvotes: 0