User forums > Using Code::Blocks

Set program's arguments don't work with vs2015 build tools & CDB

(1/2) > >>

eqychan:
I made a program (simple console app ywfxvs.exe) in C++. I set the arguments in Project -> set program's arguments and fill the program arguments edit box with "1018" (without quotes), but it don't work. when I debug the program, argc is still 1, and argv[1] is "".
Am I doing a mistake somewhere ? Thanks.

My environment: Windows 7 32bit; Codeblocks 20.03; Visual studio build tools 2015; debugger: CDB (windows kits 8.1)

BlueHazzard:
Make sure you have selected the right "target" in the programs argurments dialog and when you run your application (the drop down menu near the run button)

eqychan:
Thanks for your reply, I did select the right and same "target" when debug the application.
And now I found that when I use GDB as the debugger or run the program without debugging, it works fine. but when i change the debugger to CDB and press F8 to debug my program, again i cannot see the arguments in my program.  Any problems with my CDB parameter settings?(My debugger setting showing in the attatchment)

BlueHazzard:
A sry, my fault, i did not realize that you are talking about debugging.

Please enable full debug log in Settings->Debugger->Common->Full Debug log

Then start your debugger, and post the output of the "Debugger" tab in the log view at the bottom in code tags here (use the # in the new post editor of the forum)

thank you!

Miguel Gimenez:
From cdb_driver.cpp:81 and cdb_driver.cpp:97

--- Code: ---// FIXME (obfuscated#): Implement user arguments
--- End code ---
so looks like CDB ignores user arguments ATM.

Navigation

[0] Message Index

[#] Next page

Go to full version