-
Notifications
You must be signed in to change notification settings - Fork 215
Open
Description
Describe the bug
I want to debug a program which accepts arguments. When I use the Managed Build (Legacy Makefile?), the arguments from the debug configuration cannot be accessed while debugging. Instead it looks like the program didn't get any further arguments supplied.
To Reproduce
Steps to reproduce the behavior:
- Create new C++ project in Eclipse: Managed Build, Executable, choose Hello World Project
- Edit the main function in the cpp source to have the signature
int main(int argc, const char* argv[])
to be able to access program arguments - Create a debug configuration (Run > Debug Configurations > C/C++ Application), set "a b c" in program arguments field, confirm with Apply
- Add a breakpoint in the first line of the main function (or activate the option to stop there by default)
- Inspect argc parameter in Debug. It reads 1 instead of 4 (3 program arguments) and the program arguments from the debug configuration are not accessible
Expected behavior
The arguments from the debug configuration should be accessible in the main function.
Version Information (please complete the following information):
- Linux, Eclipse 2025-06, CDT 12.1.0
Additional context
GDB traces
Metadata
Metadata
Assignees
Labels
No labels