Author Topic: unable to debug with fresh install of code blocks  (Read 20018 times)

Offline staticwarp

  • Single posting newcomer
  • *
  • Posts: 3
unable to debug with fresh install of code blocks
« on: January 11, 2013, 02:57:54 am »
I downloaded the code blocks 12.11 binary and installed it on my win7 x64 home premium computer. When I start code blocks, I get the following environment error:

"Can't find compiler executable in your configured search path's for GNU GCC compiler"

I'm unable to compile or debug at this point.

I've checked the executable path in the debugger settings and it is correct:

C:\Program Files (x86)\CodeBlocks\MINGW\bin\gdb.exe

I've tried uninstalling code blocks and reinstalling it, this did not solve the issue.

I used the same binary to install this on my windows xp pc and did not get this error. I'm able to compile and debug with no problem with the default settings.

How can I solve this problem? Thanks :)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: unable to debug with fresh install of code blocks
« Reply #1 on: January 11, 2013, 03:48:55 pm »
"Can't find compiler executable in your configured search path's for GNU GCC compiler"
[...]
I've checked the executable path in the debugger settings and it is correct:
C:\Program Files (x86)\CodeBlocks\MINGW\bin\gdb.exe
[...]
You know that the debugger has nothing to do with the compiler, right?

Check you compiler settings, is the compiler installed ? What installation did you run, or what compiler do you use?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline staticwarp

  • Single posting newcomer
  • *
  • Posts: 3
Re: unable to debug with fresh install of code blocks
« Reply #2 on: January 11, 2013, 05:37:48 pm »
Thanks for your reply. Yes, I understand that the compiler and debugger are two separate processes. I'm sorry about the way i typed the original post, I see now that it was unclear and that I'm actually trying to resolve both a debugger issue and a compiler issue. apparently I melted the problems together in my mind when I posed my question.

I was considering the compiler problem as described above first. I installed the codeblocks-12.11mingw-setup.exe installer, and would like to use the mingw compiler. I set the compiler search directory to c:\program files (x86)\codeblocks\mingw - code blocks is still unable to find the compiler. this error is unique to my win7 x64 install. I used the same code blocks installer on my xp machine as well, and there are no error messages at startup of code blocks. Which directory should I tell code blocks to search for the compiler?

Second (now that we've separated my thoughts, thanks for that  :)), when I attempt to debug my code, debugging fails with the error message "Starting the debugee failed, no executable specified, use 'target exec'." This also only happens on my win7 x64 install. I'm using gdb for the default compiler.

I sincerely appreciate any suggestions for resolving these problems. For now I'm writing my code on my XP computer because the code blocks install worked "out of the box" so to speak, with no additional configuration necessary. I'd love to know how to smooth out these issues on my main PC.
« Last Edit: January 11, 2013, 05:39:31 pm by staticwarp »

Offline staticwarp

  • Single posting newcomer
  • *
  • Posts: 3
Re: unable to debug with fresh install of code blocks
« Reply #3 on: January 13, 2013, 03:59:53 am »
don't sweat it - I'll just use VSE2012. Thanks :)

Offline superbem

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: unable to debug with fresh install of code blocks
« Reply #4 on: January 18, 2013, 02:19:26 am »
About debugging...

I builded sucessfully CB from svn today (8792) and see that while debugging, the automatic inclusion of local variables and function arguments have not being reimplemented yet, as stated here http://wiki.codeblocks.org/index.php?title=Debugging_with_Code::Blocks#In_12.11_or_latest_nightly_builds

A healthy debugger is imprescendible.
When do you think it will be working?

Other thing but about building, my build show svn 0 instead 8792. Wonder why?

Regards

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: unable to debug with fresh install of code blocks
« Reply #5 on: January 18, 2013, 03:10:35 am »
Other thing but about building, my build show svn 0 instead 8792. Wonder why?

No idea on any debugging stuff; I do not use it much.

The "svn 0" is common if the svn command is not installed or in the executable search path.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: unable to debug with fresh install of code blocks
« Reply #6 on: January 18, 2013, 09:46:39 am »
A healthy debugger is imprescendible.
In fact currently the debugger works way better for real projects, than before. The only drawback is this missing feature.

When do you think it will be working?
When someone implements it of course.
(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!]

Offline superbem

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: unable to debug with fresh install of code blocks
« Reply #7 on: January 18, 2013, 11:58:37 am »
I would implement it, if I can.

As far as I understant it, the issue is about wx tree with cels limitation?
Maybe I'm wrong.

I don't know about wx and gdb enough, but I wish so.

Can you point me something out?

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: unable to debug with fresh install of code blocks
« Reply #8 on: January 18, 2013, 02:28:38 pm »
I would implement it, if I can.

As far as I understant it, the issue is about wx tree with cels limitation?
Maybe I'm wrong.

I don't know about wx and gdb enough, but I wish so.

Can you point me something out?
GDB (with python enabled) will crash on un-initialzed local variables. We have such discussion on our forum before.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: unable to debug with fresh install of code blocks
« Reply #9 on: January 18, 2013, 03:42:26 pm »
GDB (with python enabled) will crash on un-initialzed local variables. We have such discussion on our forum before.
...not to forget that this python enabled debuggers are wide-spread meanwhile.
So: If we re-implement it we will face report that C::B crashes (which is actually wrong, cause GDB will crash). If we don't we get reports that this feature is missing... so whatever you do is wrong. :-)

However, the new features of GDB feature watching variables very quick (highlight and select "watch") - so is this really a missing feature?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: unable to debug with fresh install of code blocks
« Reply #10 on: January 18, 2013, 04:06:49 pm »
However, the new features of GDB feature watching variables very quick (highlight and select "watch") - so is this really a missing feature?
Or highlight and drag and drop into watches window, works also for more complex stuff.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: unable to debug with fresh install of code blocks
« Reply #11 on: January 18, 2013, 07:28:05 pm »
However, the new features of GDB feature watching variables very quick (highlight and select "watch") - so is this really a missing feature?
It is a missing feature, sometimes I'm sure it could be useful. I have some plans for the watches windows, so this might return in the not so distant future.
But before that I have too many more important things to do.
(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!]