Is the D community lacking development tools?

Sean Kelly sean at invisibleduck.org
Fri May 25 06:54:06 PDT 2012


On May 25, 2012, at 12:13 AM, "Paulo Pinto" <pjmlp at progtools.org> wrote:

> On Thursday, 24 May 2012 at 19:16:57 UTC, Sean Kelly wrote:
>> On May 22, 2012, at 10:05 AM, H. S. Teoh wrote:
>> 
>>> On Tue, May 22, 2012 at 09:55:14AM -0700, Sean Kelly wrote:
>>>> It depends on the platform. GDB works fine on Linux, but is pretty
>>>> much broken on OSX. Does Visual Studio work on Windows? Because that
>>>> standalone debugger bundled with DMD is garbage.
>>> People will probably laugh at me, but over the years, I've found that
>>> well-placed printfs/writelns are much more effective in locating bugs
>>> than stepping through code with a debugger. Or inserting deliberate
>>> infinite loops at suspected problem spots and then using kill -11 to get
>>> a stacktrace.
>> 
>> I think a lot of this depends on the type of app.  Interactive debugging can be impractical for server apps, but is often easy for desktop apps.  Either way, I don't think anyone can say that debugger support isn't important for D in general :-)
> 
> I find a debugger as very useful.
> 
> For me printf debugging always feel primitive from the time debuggers
> didn't have nothing more than next/single step.
> 
> Now that the debuggers can provide so much visual information for data
> structure navigation, postmortem debugging and REPL like features for
> compiled languages, using plain printfs feels like stone age.

The problem with prints debugging IMO is that if you don't print the right stuff at the right places you need to change the code, rebuild, and hope the bug occurs again. I find that log output combined with a stack trace is typically enough to find a problem, but just logging isn't always enough. I do like printf debugging though. Just look at core.demangle :-p


More information about the Digitalmars-d mailing list