Author Topic: Set Debugger / Set Environment Per Target  (Read 1612 times)

Offline bmarquis

  • Single posting newcomer
  • *
  • Posts: 2
Set Debugger / Set Environment Per Target
« on: November 29, 2015, 03:39:23 am »
Heya!

I've been using Codeblocks for a long time, so I would like to think this community for all their efforts!

With that being said, I build using a multilib compiler suite (Mingw-w64 RT version 4.0.4, using GCC 5.2.0) And I noticed various things that limited me from utilizing the compiler as ONE compiler setting.

For starters, every compiler configuration only allows ONE debugger. As of right now, in order to debug 32- and 64-bit programs (On rare occurrences), I need to have a 32- and 64-bit debugger. Is there a way to set the debugger per target?

Next come Environment Variables. Because I am using a multilib compiler, I have two sets of everything: one for each arch. Because of this, I have to either set path or copy all needed DLLs to the directory before I can run. As far as I know, Code::Blocks only allows you to set environment variables per project, not per target. Is there actually a way I can set environment variables, most notably the PATH variable, per target?

I will take any way, if scripting is needed, I am willing to make a script for this.

I am utilizing SVN Rev 10595 ( 21 November 2015)

Thank you again for all that you do!
« Last Edit: November 29, 2015, 04:00:38 am by bmarquis »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13222
    • Travis build status
Re: Set Debugger / Set Environment Per Target
« Reply #1 on: November 29, 2015, 12:01:51 pm »
I need to have a 32- and 64-bit debugger. Is there a way to set the debugger per target?
Probably you can define two compilers, one for 32 and one for 64bit. Then you can have two different debuggers.
This is just a workaround. Patches welcome, but it won't be that easy. In fact there is a bug related to targets and different debuggers/compilers.

Next come Environment Variables. Because I am using a multilib compiler, I have two sets of everything: one for each arch. Because of this, I have to either set path or copy all needed DLLs to the directory before I can run. As far as I know, Code::Blocks only allows you to set environment variables per project, not per target. Is there actually a way I can set environment variables, most notably the PATH variable, per target?
If you add the paths to your libraries in the search paths -> linker, then CB will automatically modify the path variable, before starting the your executable with both build -> run and debug ->start.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]