[Pythonmac-SIG] Python threading.Thread vs PyObjC performOnMainThread
Bob Ippolito
bob at redivi.com
Mon May 16 22:47:41 CEST 2005
On May 16, 2005, at 4:32 PM, gandreas at gandreas.com wrote:
>
> On May 16, 2005, at 2:22 PM, Bob Ippolito wrote:
>
>
>>
>> On May 16, 2005, at 2:53 PM, gandreas at gandreas.com wrote:
>>
>>
>>> I should be able to directly send the signal from the IDE to the
>>> targeted app (since it's a child of the IDE), and the standard
>>> "catch a unix signal invokes the debugger" action should work
>>> (since the debugger interface on the client talks back to the IDE).
>>
>> Yeah, this will work fine. I'm just saying, that if you wanted
>> something even more decoupled (to implement remote debugging,
>> plugin debugging, objc.inject debugging, etc.), then that's how you
>> could do it.
>
> That's an _excellent_ suggestion! The thought of debugging an
> already running application would be extremely useful....
This is, more or less, the raison d'être for objc.inject. Since it
can load into an arbitrary thread, it's possible to even use it to
inject a debugging stub into an unknowing Python application (beyond
the uses of injecting into an Objective-C application, since PyObjC
ostensibly turns Objective-C applications into Python one from the
interpreter's perspective).
It's tricky, of course, but possible.
-bob
More information about the Pythonmac-SIG
mailing list