in reply to Win32, $DB::fork_TTY, and a threads equivalent

Historically, debugger support for threads is rarely helpful for debugging threaded apps, regardless of the language.

Bugs in threaded apps can be roughly divided into two groups:

The correct way to write threaded applications, is to treat each threads function as a separate program that when it runs, can find itself with a very limited set of states, and correctly deals with each of those possible states.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.
  • Comment on Re: Win32, $DB::fork_TTY, and a threads equivalent

Replies are listed 'Best First'.
Re^2: Win32, $DB::fork_TTY, and a threads equivalent
by renodino (Curate) on Sep 19, 2005 at 16:19 UTC
    I agree entirely with your assertions; however, eventually I (or, more importantly, my customers, and for that matter, the perl community at large) will need to debug an app in a threaded environment, if only as a unit testing exersize. (Thread::Apartment makes that need more critical, tho it does provide an i/f to transparently revert to single-threaded mode) The current perl debuggers are simply not useable for that scenario.

    I'm working on a solution (working title Devel::Nimbus) similar to ptkdb, but simplified to a notebook with a page for each thread/process, and operating via a sockets i/f to a hacked perl5db. Hopefully it will be sufficient to deal with the issues, and portable enough to be generally useful.