Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Re: Debuggers (was Jihad)
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Eric Newhuis <enew@b...>
Subject: Re: [Caml-list] Re: Debuggers
> I think (as confidently as I can without reading the source :) that it
> would be relatively straightforward to add that to camldebug. However,
> I won't add it mostly because I don't use debuggers when I have an
> interactive prompt available (such as the ocaml program provides),
> because with a toplevel it's easier to write small functions, test
> them right there, and compose them incrementally.


Have others had the same experience as me here?

I've found myself becoming more and more intentional in my habits.  I don't
use debuggers unless there is an emergency.  Instead I write unit tests and
use assertions to halt the system with useful exception information.

And I have found that writing unit tests in functional languages is pleasant
whereas in imperative langaues it is a chore.

"Traditional" debuggers are just not that useful when one has a good suite
of unit tests.

I would have had no idea what I just said a few years ago when all I did was
code in C++ and single-step through code in the debugger.  I've been there.
I thought I was code king then.  Boy was I stupid!

Moreover single-stepping and breakpoints are often times not possible in my
environment that consists of many threads and parallel asynchronously
communicating tasks.

The proof of my ways is in the result:  I can develop complete error-free
systems much faster than before.

Having said all this I still think "traditional" debuggers are absolutely
critical for one's success.  I use them like parachutes, but never on a
daily basis.  If you find yourself using a debugger on a daily basis then I
urge you to consider the wisdom of your ways.  Yes by all means learn how to
be effective at it, but once you learn those important skills move on to a
more proactive habit.

Eric Newhuis

Bug reports:  FAQ:
To unsubscribe, mail  Archives: