Solved

Fine tune my debugging skills.

Posted on 2004-09-04
8
310 Views
Last Modified: 2010-04-01
Hello;

I am wondering if there is a book anyone could recomend and/or link of how to use VC++6.0 and such debugger more efficiently. To learn more details.

I have my manuals that came with the compiler, but you know how manuals are. They tend to leave the layman in the dust.

I would like to seriously improve my debugging skills.

For example, to be able to debug apps that have hard time compiling under the debug version. To know why with much more detail.

A hard core debugging book/link for VC++6.0 and family (I will accept family if I can use info to relate).

A debugging for dummies with good details.

RJ
0
Comment
Question by:RJSoft
8 Comments
 
LVL 55

Assisted Solution

by:Jaime Olivares
Jaime Olivares earned 60 total points
ID: 11982854
Personally I think that improve your debugging skills means to decrease your logic mind capabilities. I, and many others programmers don't use debuggers. When you code orderly, you will be able to detect and deduce where was every problem, without using debugging options, just some MessageBox() calls.
Better you can choose a 'Good Programming' book. Somethink like:
http://www.amazon.com/exec/obidos/tg/detail/-/0735619670/104-6575783-7307911 (Code Complete)
http://www.amazon.com/exec/obidos/tg/detail/-/0201563657/qid%3D1094353302/104-6575783-7307911 (C++ programming style)
http://www.amazon.com/exec/obidos/tg/detail/-/0201760428/qid%3D1094353302/104-6575783-7307911 (Exceptional C++ style)

Good luck,
Jaime.
0
 
LVL 7

Accepted Solution

by:
jimwasson earned 250 total points
ID: 11983094
There are a lot of places to go for debugging techniques and information.

One of my favorite books on the subject is "Debugging Applications" by John Robbins.

Microsoft's over for debugging -- "Debugging Tools for Windows - Overview" is at:

http://www.microsoft.com/whdc/devtools/debugging/default.mspx

Your debugging ability is developed with practice. Experience is a very important part of the process of improving one's debugging skills -- the more you do it the better you will get at it. Use your debugger to help you understand what is going on "under the hood", even down to the assembly level.
0
 
LVL 11

Assisted Solution

by:avizit
avizit earned 65 total points
ID: 11983096
Debugging is more bout knowing how to analyse and look for errors than bout learning bout a particular debbugger whether VC++ debugger or GDB ..if you are good atdebuggging , you can just pick up any debugger pretty fast .. its just a matter of syntax /command /optiosn after that


a good link is : http://www.robelle.com/library/smugbook/todebug.html


http://www.drpaulcarter.com/cs/debug.php

also learn what is the assert() function , they are also helpful at times in pinpointing locations where yuo are asuming some vakues and actually it is not so etc etc
0
 
LVL 48

Assisted Solution

by:AlexFM
AlexFM earned 125 total points
ID: 11983164
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 22

Expert Comment

by:grg99
ID: 11983778
You could try avoiding having to debug, by coding defensively.

When you write each statement, think about what could go wrong: subscripts out of range, API returns an error code, NULL pointer, passing value instead of address, string overflow, and arithmetic overflow are the biggies.   Add if(0 statements to check pointers and API results.  

That will prevent 88% of debugger-type errors.



0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 11984055
I agree with grg99, that's what I am talking of. As programming teacher, I recommend my students to improve good programming better than good debugging. Actually I am a bad debugger, but solve my problems rapidly without it.
0
 
LVL 3

Author Comment

by:RJSoft
ID: 11985762
Well, I decided to get

Debugging Windows Programs: Strategies, Tools, and Techniques for Visual C++ Programmers
by Everett N. McKay

(after reading and re-reading reviews and amazon details)

True, Robbins seems to be the leading author in the debugging arena. But I am not at that level. I use to use the debugger that came with Borland C++ so I know simple things of how to step etc. But after I switched to VC I got lazy and started using MessageBox to display values. Partly cause VC makes simple debugging more of a pain than Borland's old compilers did.

Of course using MessageBox works in a crude kind of a way, but I sense that it has seriously weakened my abilities. I would feel much more confident knowing how to use VC's debugger more efficiently. Perhaps save serious time.

The main book of Robbins (non NT) is also out of print. Or has been replaced with an NT/Windows version. The older Robbins book is the one that really interest me as it goes into great detail of debugging even to the level of building your own debugger. Also how to interpret those assembler core dumps. But, like allot of other things program related I go off chasing rabbits and forget my main objectives.

The older Robbins book is also costly $99. I fear that it's way above my level. Surprizingly the newer release with NT I can purchase for about $4 used. I probably will purchase that for the heck of it.

So I am settling for a more straight forward to the point book with tips and tricks. Which to me practical is gold. Im not trying to conquor the universe, just have some insight on how to debug properly.

RJ

 
0
 
LVL 3

Author Comment

by:RJSoft
ID: 11985802
jaimie;

Although we dis-agree on the use of a debugger, I felt I should give you some points for
the link to "Code complete". A good book I will have to look into.
Thanks.

RJ
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now