The following quote recently came up on the TDD mailing-list:

I have worked in places where we would tell junior developers that
they were not allowed to use the debugger without asking permission first.
Only if they could justify the debugger’s use were they allowed to use it.

This is a fairly radical position, so I can’t possibly agree with it 🙂

There are several disturbing points about this quote:

  • How do you justify the use of a debugger?  It’s a red
    herring to give some grounds to this arbitrary decision but in short, I’m
    pretty sure it’s an impossible task.  And if you are talking to an
    extreme TDD advocate, you can be sure they will always find a good reason to
    convince you that writing tests is the only way to locate a problem.
  • The only way to learn when not to use a debugger is to use a
    debugger a lot
    .  Practice will teach you the strengths and
    weaknesses of a debugger, what its limitations are, what you can achieve
    with it and what should better be approached differently.  As you use
    it, you will accumulate knowledge on which categories of bugs a debugger is
    good at solving and when you tend to come back empty-handed.  In short,
    you are building up this intangible set of diffuse knowledge referred to as
  • It’s better to teach someone how to use a tool properly rather than
    forbidding them from using it completely.

  • By the time the problem shows up, you probably don’t have tests to catch
    it yet, so whatever you will end up doing is not test-driven development

My dirty little secret is that I love both test-driven development and
debuggers.  I use both all the time without any particular pattern. 
Sometimes I spend most of my time writing tests, other times I’m knee-deep in
Eclipse’s debugger, juggling with conditional breakpoints, stack frames and
multiple expressions that I keep reevaluating.

Is it the most productive use of my time?  I don’t know, I’m still
working it out and it’s impossible to answer such a question anyway.  But
by using all the tools I have at my disposal, I have definitely increased my
knowledge in the general area of "finding and solving problems".  And I
don’t think anybody should be denied that right.

Again, what concerns me in the quote above is the dogmatic attitude and the
total lack of regards for the skills of the person making the request. 
They might be less experienced than you, but it doesn’t mean they are stupid and
that they should be treated as children.  And who knows, maybe one day they
will be teaching you something about debuggers…