[Bf-committers] remote Python debugging

Theo de Ridder theo.de.ridder at planet.nl
Wed May 12 16:25:43 CEST 2010


maybe I should have posted this on bf_python,
but it is here because it represents a big compliment
for you:  developers of blender2.5 !

today I succeeded in having a Python debugger
running through an asynchronous socket-connection,
based on the standard bdb and asyncore modules;
this includes having transparent realtime navigation access
to the whole runtime blender python, including stackframes.
so things seems to be now indeed threadsafe and the new
eventsystem is a big step forwards !

a minor problem remained not finding an api for user-defined
timerevents (needed for polling sockets), so I (mis)used the
TIMER0 events generated by animating; trying to start
this animation automatic however by
bpy.ops.screen.animation_play()
was not working (nor from the console, nor in an invoke
or modal call), and it is a mystery to me why not.

My personal interest in the Python debugger is not so much in
the old way of stepping by hand through code or having
some linebased breakpts, but using it for nonintrusive guards
as highlevel constraints that scale logaritmic
as handmade specs with code under test as an alternative
for all those verbose unit tests that scale linear at best.
I am going to use coroutines to make evaluation of constraints
clean and efficient, not having all the admin of callbacks
and eventhandlers nor the overhead of threads.
Finally my real challenge will be to make this approach as symmetric
as possible for specifying versus testing complex behaviour
of software itself as well as that of autonomous robots and characters.

~Theo





More information about the Bf-committers mailing list