Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: ssudhaka on July 28, 2010, 09:48:57 am

Title: Passing arguments in DEBUG mode
Post by: ssudhaka on July 28, 2010, 09:48:57 am
I have CB 10.05 rev 6283 still it does not allow me to pass arguments via command line in DEBUG mode. When running the application normally the arguments can be passed without any issues.
I have set the arguments using set program argument's dialog and also ticked the "this target is the main executable checkbox", is this a bug
Title: Re: Passing arguments in DEBUG mode
Post by: Jenna on July 28, 2010, 10:02:03 am
Works for me (debian unstable 64-bit, g++ 4.4.4).
Please give a short example where it fails.

Are you sure the commandline arguments are set correctly for Release and Debug target ?
Title: Re: Passing arguments in DEBUG mode
Post by: ssudhaka on July 30, 2010, 12:14:37 pm
I am using the windows version 10.05

I have set the program arguments and when the run my program it shows the debug arguments in the build log console :
Executing: "C:\CodeBlocks/cb_console_runner.exe" "C:\CodeBlockProjects\output\server\my_server.exe"  "C:\Program Files\step012.xml"

However, when I run the same program in debug mode it shows the following in the debug console :
Executing: "C:\CodeBlocks/cb_console_runner.exe" "C:\CodeBlockProjects\output\server\my_server.exe"

In debug mode the program complains that arguments to the program have not been provided.
I am able to debug to the point where it throws the error message.

Title: Re: Passing arguments in DEBUG mode
Post by: MortenMacFly on July 30, 2010, 02:39:52 pm
Executing: "C:\CodeBlocks/cb_console_runner.exe" "C:\CodeBlockProjects\output\server\my_server.exe"  "C:\Program Files\step012.xml"

Executing: "C:\CodeBlocks/cb_console_runner.exe" "C:\CodeBlockProjects\output\server\my_server.exe"
Are you sure the commandline arguments are set correctly for Release and Debug target ?