[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [OT] C++ templates and debugging (limitations) in Linux



When I have developed template code, I have always started by implementing
the same algorithms without the templates.  Once the non-template code works
and is debugged, I convert it to the template.  I have just found using real
types is more convenient to think about, and to debug.

gdb can be slightly confusing if you don't use it all of the time, however,
there are gui interfaces for it.  Logging statements, as well as, sending
debugging statements to stderr, stdout or to a file can also be useful.

On Fri, Jan 30, 2009 at 7:49 AM, H.S. <hs.samix@gmail.com> wrote:
Daniel Burrows wrote:

>
>   Personally, I almost only use a debugger to get backtraces after a
> crash.  I find logging statements to be easier, more reliable, and more
> useful.  If you write cout<< statements directly into your code, of
> course, it gets cluttered and unwieldly -- I would suggest taking a look
> at a logging framework like log4cxx (available in Debian, even :) ).
> That also means that log statements you insert will stick around for
> later re-use should you ever have more questions about that bit of the
> code.


Very interesting. I think I will take a look see at log4cxx.

Thanks.


--

Please reply to this list only. I read this list on its corresponding
newsgroup on gmane.org. Replies sent to my email address are just
filtered to a folder in my mailbox and get periodically deleted without
ever having been read.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: