Author Topic: Cant figure out how to debug.....  (Read 7270 times)

Offline the-moon

  • Multiple posting newcomer
  • *
  • Posts: 10
Cant figure out how to debug.....
« on: November 18, 2005, 08:17:23 am »
I'm trying to debug my C++ app, mingw32 for the complier.

But I'm having some trouble....

I try to debug and it says "Debugger executable not set. To set it, goto " etc

So, i goto project properties, then i goto "Projects build options"

I select "Produce Debugging Symbols"

After that i rebuild my project and try to debug again. And it tells me the same error again.

Could anyone please explain to me what I'm doing wrong....


Offline Urxae

  • Regular
  • ***
  • Posts: 376
Re: Cant figure out how to debug.....
« Reply #1 on: November 18, 2005, 12:17:05 pm »
Go to Settings -> Compiler, tab "Programs". Debugger should be set to gdb.exe

Offline the-moon

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Cant figure out how to debug.....
« Reply #2 on: November 18, 2005, 07:23:43 pm »
Yeah its set to gdb.exe.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9617
Re: Cant figure out how to debug.....
« Reply #3 on: November 18, 2005, 08:19:36 pm »
Yeah its set to gdb.exe.
Did you veryify that you actually have a gdb.exe in the path? Are you using the Code::Blocks MinGW version? If not and you've donwloaded the MinGW package from somewhere else the debugger might be really missing.

Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline the-moon

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Cant figure out how to debug.....
« Reply #4 on: November 18, 2005, 08:26:57 pm »
Did you veryify that you actually have a gdb.exe in the path? Are you using the Code::Blocks MinGW version? If not and you've donwloaded the MinGW package from somewhere else the debugger might be really missing.

Morten.


Yes gdb.exe is in my bin folder for codeblocks and yes i downloaded codeblocks Mingw version.

Offline the-moon

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Cant figure out how to debug.....
« Reply #5 on: November 18, 2005, 09:34:42 pm »
Can anyone please help me.

I really would like to do some coding today.

I dont want to have to reinstall Devc++. Id much rather use codeblocks. But if the codeblocks debugger dosent work, i have no choice but to use devc++ until its fixed.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9617
Re: Cant figure out how to debug.....
« Reply #6 on: November 18, 2005, 09:44:57 pm »
Can anyone please help me.
Ok, let's do some basics:

1.) Could you verify that your PATH environment variable is setup in a way that there is
a) not another (incompatible) gdb.exe int the PATH
b) the real gdb.exe from code::Blocks ist IN the path
If not, just expand the PATH environment for testing purposes to the CodeBlocks\Bin directory. C::B will recoginise this after a restart of the application. Make sure you use the "My workplace" dialog to update the new PATH environment variable. otherwise the settings might not applied (or only after a restart).

2.) Please make sure you did not install C::B in a path that contains spaces. This might be an issue.

3.) Could you post a screenshot of the compiler (path) settings (global / project wise). Did you enable the Debugger's debug-log (within the settings of C::B GDB debugger). What's the output there?

Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline the-moon

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Cant figure out how to debug.....
« Reply #7 on: November 18, 2005, 09:58:41 pm »
Can anyone please help me.
Ok, let's do some basics:

1.) Could you verify that your PATH environment variable is setup in a way that there is
a) not another (incompatible) gdb.exe int the PATH
b) the real gdb.exe from code::Blocks ist IN the path
If not, just expand the PATH environment for testing purposes to the CodeBlocks\Bin directory. C::B will recoginise this after a restart of the application. Make sure you use the "My workplace" dialog to update the new PATH environment variable. otherwise the settings might not applied (or only after a restart).

2.) Please make sure you did not install C::B in a path that contains spaces. This might be an issue.

3.) Could you post a screenshot of the compiler (path) settings (global / project wise). Did you enable the Debugger's debug-log (within the settings of C::B GDB debugger). What's the output there?

Morten.


Are u talking about my system Path?

Or a path for code::blocks...

System Enviroment Path -%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\CodeBlocks\bin

Heres a image of the paths for C::B, and also the error i get when i try and debug....

http://cdfbr.zidev.com/gfx/CBPath.jpg
^is this what u wanted?

Additional paths has nothing in it.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9617
Re: Cant figure out how to debug.....
« Reply #8 on: November 18, 2005, 10:42:33 pm »
System Enviroment Path -%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\CodeBlocks\bin
http://cdfbr.zidev.com/gfx/CBPath.jpg
What wonders me: You are writing the path contains "C:\CodeBlocks\bin" but the screenshot states "C:\Program Files\Codeblocks". What is right?

Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline the-moon

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Cant figure out how to debug.....
« Reply #9 on: November 18, 2005, 11:00:04 pm »
LoL

OMg....

It works!

I never even thought about that, i figured that code blocks would use the path i installed it from.

THanks alot for the help

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9617
Re: Cant figure out how to debug.....
« Reply #10 on: November 18, 2005, 11:09:29 pm »
It works!
Great! Then I can go to bed now... :lol:

Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Cant figure out how to debug.....
« Reply #11 on: November 18, 2005, 11:24:01 pm »
I never even thought about that, i figured that code blocks would use the path i installed it from.

Codeblocks? Yes!
Mingw? No!

Anyway here's a little tutorial on how MS-DOS works.

Once upon a time...  :lol: there was something called command.com. Whenever you ran a program that wasn't in the current directory, it said "bad command or filename". So then someone got the idea of making a PATH variable, so that any paths inside it would run automatically. Many programs of MS-DOS like "find", "more" grew dependent on this feature to work correctly.

MinGW is not a "program" either. It's a set of independent programs that also depend on this PATH feature to work correctly.

See? It's no magic, you just have to know how these things work.

Offline the-moon

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Cant figure out how to debug.....
« Reply #12 on: November 18, 2005, 11:43:36 pm »
LoL

OMg....

It works!

I never even thought about that, i figured that code blocks would use the path i installed it from.

THanks alot for the help

I ment to say, i figured C::B would use the path i installed it to.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9617
Re: Cant figure out how to debug.....
« Reply #13 on: November 18, 2005, 11:47:50 pm »
See? It's no magic, you just have to know how these things work.
rick22, didn't you advise me in another thread (http://forums.codeblocks.org/index.php/topic,1388.0.html) not to scare "newbies" like that...?!  :lol: (Don't take it seriously, "the-moon".)

Morten.

...not yet in bed.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ