SPUG: Attach a remote debugger to an unsuspecting perl process

Joshua ben Jore twists at gmail.com
Wed Jul 16 11:56:22 PDT 2008

I was telling someone about this last night and thought I'd share the
code I wrote last night after the event. It /almost/ works. I think
I'm using ptys wrong or something like that. When I run it, some
things I expected Expect to send to gdb didn't arrive until I
intervened manually. Buffering or some such. This will probably show
up in a future version of Enbugger.

In one terminal wait for a debugger to show up from the network.

    nc -l -p 8361

In another, attach brain slugs to your perl.

    pdb --pid 11423 --host localhost --port 8361

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pdb
Type: application/octet-stream
Size: 3971 bytes
Desc: not available
URL: <http://mail.pm.org/pipermail/spug-list/attachments/20080716/767211b8/attachment.obj>

More information about the spug-list mailing list