Author Topic: Debug a program with arguments (from CLI)  (Read 3380 times)

juzna.cz

  • Guest
Debug a program with arguments (from CLI)
« on: August 09, 2012, 10:40:35 am »
Hi,

I'd like to use CodeBlocks for debugging. With gdb, I can start directly to execute a command with arguments, like this:
gdb --args ls -la

Is the same possible with CodeBlocks? i.e. something like
codeblocks --args ls -la

would start CodeBlocks, spawn ls process with -la arguments and immediately attach to debug it?

Would be a much nicer way to debug with CodeBlocks GUI than in gdb's prompt.

Thanks

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Debug a program with arguments (from CLI)
« Reply #1 on: August 09, 2012, 11:03:22 am »
Add the arguments to your debug-target in "Project -> Set programs's arguments".