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
778 Views Asked by Kris At
1
There are 1 best solutions below
Related Questions in DEBUGGING
- How to pass the value of a function of one class to a function of another with the @property decorator
- Visual Studio C++, breakpoints not stopping debugging DLL (GODOT GDExtention)
- Playwright JS: Getting an error when debugging using line numbers
- C++ skips line when promting for user to enter name of person being added to a string array
- Xcode: Can't Attach to process
- unity navmeshsurface prefab not found or whatever
- It seems to be a bug about "base::trace()" or "methods:::.TraceWithMethods()"?
- How to check reference counting issues when doing direct manipulations of CPython objects?
- How to scroll to the bottom of console window in PyCharm2019 automatically?
- need help debugging prolog
- Is there a way to deactivate (but not delete) conditional breakpoints when debugging?
- How can i debug a python exe which is created by using pyinstaller?
- Increment or Decrement volume programmatically on Xiaomi device adjusts it by 10 steps instead of one step
- Checking request JSON with image data
- Why cannot I set font of `xlabel` in `plotmf` in MATLAB?
Related Questions in VISUAL-STUDIO-CODE
- Is there a way to prevent vscode from forwarding ssh agent to remote dev container?
- flutter Null check error: did not show file and line number
- vscode, debug angular, first time, doesn't debug, 2nd time stops at main.js then it's ok
- trouble with creating a project for Pymakr in vscode
- Compiling c++ code by VS Code is always blocked by clang-tidy error 'Error running 'clang-tidy'
- Disable typescript in VS Code
- couldn't sign in visual studio code
- I can't add text to "Message" in VS Code when committing to Git
- Cannot type single backtick in VSCode
- WebScraping doesnt work, even without error
- Visual Studio Code keeps discovering python interpreters forever and vscode-server on remote is busy 100%
- vscode uses different cocoapods version when running a task
- Live server extension in VS Code works in background but do not pop the web browser
- How to recover deleted files from create vite react project
- Autocomplete not working for apache spark in java vscode
Related Questions in GDB
- crash utility itself crashes while decoding kdump generated from null pointer dereference in kernel module
- How to compile the Linux kernel with -O0 for more detailed debug?
- Can GDB call user-defined signal handler and still break on the code which threw a signal?
- Executable under GDB invokes different embedded Python
- GDB or GDB-oneAPI freezing when displaying complex variables in VSCode
- gdb: incorrect exit code
- Assembly, gdb duplicate names
- Don't pause GDB on child process exit
- Breakpoints for assembly code in VSCode with GDB
- Why is there a difference in memory writes when my qemu runs directly and when debugging the img with GDB?
- Shell execution buffer overflow server directly hosted
- How to set breakpoints in Visual Studio Code for debugging kernel code running in QEMU?
- Retrieving Exit Code from a Program Run with GDB in GitLab CI/CD Pipeline
- How to resolve the shared library of a function in core file, using GDB - when no symbols are loaded?
- GDB 'gef>' spam when using `layout asm`
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
- VS Code Language Server Extension Guide Lacks "Attach" Launch Configuration
- VS code launch config logs
- AWS CDK (Typescript) How run AutoScalingGroup without use deprecated launch configurations?
- Generate Eclipse launch configurations with Gradle
- Cannot find configuration for gradle
- How to debug a micro frontend app using module federation dynamic system host pattern in vscode
- Assigning a launch configuration to an Auto-Scaling Group using CDK
- Creating a LaunchConfiguration and updating the ASG
- Conditional expressions with Terraform deploying AWS resources
- Attach existing EBS volumes to launch configuration in Terraform
- Multiple template files with autoscaling groups and launch configurations with Terraform
- Create launch configuration not only for workspace instead for that specific language
- How can I select a community AMI in AWS Launch configuration?
- How to ensure that the ASG ( Auto scaling Group) replaces existing instances with every change in the Launch configuration
- change aws launch template name
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.