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.
argc=1 even after specifying args in launch.json in VS code
775 Views Asked by Kris At
1
There are 1 best solutions below
Related Questions in DEBUGGING
- Eclipse find source file from library
- Debug native code in Android Studio
- Breakpoint "concurrency" in Intellij
- PhpStorm IDE. Collapse custom/debug code
- How does one debug infinite recursion in Haskell?
- Android Studio missing exception stacktrace in Logcat
- java FileNotFoundException wont locate a file in the same project
- How can I debug scala.js unit tests?
- Why Eclipse Debugger does not stop on scoped exception breakpoint (how to stop on handled exception)
- Suggestions for my Selection Sort / Java
- Fortran Debugging
- Debug Excel VSTO add-in when launched by double-clicking existing file
- Starting GDB with interpreter mi via .gdbinit file
- How to print call stack in Swift?
- Preventing threads in Xcode
Related Questions in VISUAL-STUDIO-CODE
- vscode file icons
- Building C# code in VSCode on Mac
- How do I support jasmine and es6 syntax in Visual studio Code?
- JS Code didn't work, trying do a demo in css lessons
- Debug Java in Brackets editor or Visual Studio Code
- Visual Studio Code, C# support on Windows
- What is the use of the Developer Tools in VS Code?
- Option to push disabled in Visual Studio Code
- How do I include 'System.Runtime.Serialization.Json' namespace in my VSCode project on Mac OS X?
- Using System.Web.Http on mac os x
- VSCode intelliSense autocomplete for javascript
- Set language for syntax highlighting in Visual Studio Code
- Import {} from location is not found in VS Code using TypeScript and Angular 2
- Predefined type 'System.Object' is not defined or imported [dnxcore50]
- VS code appending special characters on paste
Related Questions in GDB
- How to run program in gdb via bashscript with backtrace?
- Starting GDB with interpreter mi via .gdbinit file
- How to find illegal instructions in a program?
- Strange gdb 7.9 boost on Yosemite 10.10.13
- How to call fortran module helper subroutine in GDB?
- GDB can't access/step into file for debugging
- Segmentation fault - Invalid free unresolved - C
- redirect I/Os in GDB in MI mode
- Understanding assembly of a simple C program
- GDB Python pretty-printer not indenting substructures
- Can gdb break on/dprintf on/specify location as: return from specified function?
- Understanding Red-Black Tree Traversal of STL multiset in GDB
- How to drill down into shared_ptr [Netbeans, clang++, gdb]
- Following memory allocation in gdb
- How can I break on UBSan reports in gdb and continue?
Related Questions in ARGS
- Trouble with variable scope with args Ruby script
- How to check the end of args array?
- Java Date Format in "args"
- Use main args with SpingBoot & velocity
- Why do we usually start programs with public static void main('String[] args')?
- How call a function objective c with args in swift
- Flask submit data outside of form input fields
- Gradle won't pass args to Java main
- Java starting a seperate process and attaching args
- Variable name as function argument?
- calculate distance between samples in dataframe with apply() and user-defined function with multiple args
- perl6 How to read from stdin and take command line args?
- How to read a .txt as an argument for netbeans
- Kivy python *args
- Feed a Scanner via String
Related Questions in LAUNCH-CONFIGURATION
- Launch n times a Launch Configuration C/C++
- How can I select a community AMI in AWS Launch configuration?
- VS Code Language Server Extension Guide Lacks "Attach" Launch Configuration
- reference launch config by count.index in an autoscale group
- Create launch configuration not only for workspace instead for that specific language
- When creating a LaunchConfigurationTab how do I get the 'apply' button to highlight?
- Creating a LaunchConfiguration and updating the ASG
- What is the purpose of the .launch file in the AndroidPocketSphinx project?
- Eclipse does not show all existing run configurations
- Multiple template files with autoscaling groups and launch configurations with Terraform
- Conditional expressions with Terraform deploying AWS resources
- Attach existing EBS volumes to launch configuration in Terraform
- Eclipse feature based launch unable to resolve dependency
- Unable to debug Eclipse Application because of missing classes
- multi region apache cassandra in autoscaling group in AWS
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?

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.