Code::Blocks Forums

User forums => Help => Topic started by: ien on February 14, 2006, 08:06:00 am

Title: Can't use debugging tool
Post by: ien on February 14, 2006, 08:06:00 am
Hi,

I am new to programming. I have installed Code Blocks 1.0rc2_mingw. The debugging tools appear on the menu bar but they do not seem to have any effects when I add watch, toggle breakpoints etc. What can I do?

Ien
Title: Re: Can't use debugging tool
Post by: killerbot on February 14, 2006, 08:47:56 am
for starters, download a nighlty, from this forum (sub section : nightly builds).
RC2 is old ;-)

Then give it a new try. To debug, you must have a project compiled (with debug settings on).
Title: Re: Can't use debugging tool
Post by: Michael on February 14, 2006, 12:03:53 pm
for starters, download a nighlty, from this forum (sub section : nightly builds).
RC2 is old ;-)

As alternative you can build C::B using the SVN sources. It is easy and IMHO it is worth :).

Michael
Title: Re: Can't use debugging tool
Post by: Game_Ender on February 14, 2006, 10:17:17 pm
Something about the nighly builds should be posted on the main website. Something to the effect of "If you have problems try a nightly build first".
Title: Re: Can't use debugging tool
Post by: ron8888 on February 19, 2006, 07:05:41 pm
Hi,

I'm new and my programming skills are limited to coding numerical simulations in matlab and visual c++. I have a similar problem. I have 2 questions/problems.

Problem:
(i) I couldnt get the debugger to run properly. At first, it just ignores the breakpoints when I run my code. I then installed the latest nightly build. Upon running the debugger, I get a message that the debugger/executable is not set. I am using the vc++ as my compiler. Under compiler >> programs, the file cdb.exe is listed as the debugger. But browsing that directory shows that no such file exists. I have reinstalled the vc++ toolkit but there is still no such file. I can't find a post on debugger on this.

(ii) I am unable to initiate a new post but can only reply to existing posts. Are new members under restrictions on posting?

Thanks in advance.

Ron

Title: Re: Can't use debugging tool
Post by: MortenMacFly on February 19, 2006, 07:24:51 pm
(i) [..] cdb.exe But browsing that directory shows that no such file exists. [...]
This is unfortunately not part of the Visual C++ Toolkit. You have to (additionally) download the "Microsoft Debugging Tools". They are also available for free at the MS homepage.
With regards, Morten.
Title: Re: Can't use debugging tool
Post by: MortenMacFly on February 19, 2006, 07:28:51 pm
(ii) I am unable to initiate a new post but can only reply to existing posts. Are new members under restrictions on posting?
Normally not. Do you see the Menu with "Mark Read  |  Notify  |  New Topic  |  Post new poll" at the top of each forum section? If not, you might ran into the same trap I did ones: I am using "adblock" (a Firefox extension) with a quite restrictive filter that did cut out elements of this forum. It took me a while to find that out. So, if you are using any kind of ad-blockers, try to disable them (some firewalls contain similar technology, too). Maybe this helps...
With regards, Morten.
Ps.: Sorry, I forgot to answer that in my first reply.
Title: Re: Can't use debugging tool
Post by: Michael on February 19, 2006, 07:33:36 pm
Hello,

You can get the "Microsoft Debugging Tools" here (http://www.microsoft.com/whdc/devtools/debugging/default.mspx).

Best wishes,
Michael
Title: Re: Can't use debugging tool
Post by: ron8888 on February 19, 2006, 08:45:42 pm
Thanks for the quick responses. This is my first experience with open source in a long time (since I graduated and had to move all my c code from a unix/xemacs environment to visual studio at work). I tried using the gcc compiler instead and my old code seems to work fine.

Question:
I code only stand-alone apps which reads in data and does alot of number crunching (stuff from numerical recipes and like). My impression from reading/googling on gcc vs vc++ is that in my case, it shouldnt make a difference. Does anyone have leads on a (small) set of references that provides an introductory overview on the differences and when it matters. I hope to stick to c::b with gcc in future if I can.

My current approach is to recreate my existing projects from vc++ (actually i had used visual studio .net from my university but they took that away  :( ) to b::c until I find one that doesnt work. I have learned alot from this experience and can appreciate why people (e.g like those at /.) are so excited about open source.
Title: Re: Can't use debugging tool
Post by: MortenMacFly on February 19, 2006, 09:50:22 pm
I code only stand-alone apps which reads in data and does alot of number crunching (stuff from numerical recipes and like).
I am working in similar fields. I am using NR, LAPACK and similar for "ages" now. I've always used GCC because I believe for mathematical computing and cross-platform development it's a really good choice. From my point of view I can only say: Go on.
With regards, Morten.
Title: Re: Can't use debugging tool
Post by: nacitar on February 22, 2006, 03:59:43 am
if you download the platform SDK it puts in the start menu a shortcut to a msi installer for the debug tools too... so you shouldnt even need to download them seperate if you have a current platform sdk installation.