Originally posted to the perforce-user mailing list by: Michael Mirman
I do something similar. Our triggers are in perl, but this may work in other cases:
the line of the trigger I need to debug is changed to something like
xterm -display myhost:0 -e perlpath -d usual-trigger-goes-here
(On myhost, I obviously do something like xhost +).
For obvious reasons, I don’t do this against the production.
Fortunately, we have a test infrastructure where this method comes handy once in a while.
3 Apple Hill Drive, Natick, MA 01760
From: email@example.com [mailto:firstname.lastname@example.org] On Behalf Of phopkins
Sent: Wednesday, August 27, 2014 1:35 AM
Subject: [p4] Remote debug triggers and brokers howto
Posted on behalf of forum user 'phopkins'.
So I've asked before about peoples workflow on server side scripts, and from
what I can gather everyone is happy to debug local and do a lot of
'printf' when necessary. Not exactly the kind of way I like to develop.
So sharing this method which gives me excellent remote debugging of scripts when
they execute on a server.
��- I use python
��- I use eclipse
��- My server is linux, but eclipse client can be eclipse or windows.
Basically follow this guide here
I had to add two lines to my sometrigger.dev.py script
import pydevd; pydevd.settrace('x.x.x.') #my client machine running
And 1 line to my bash wrapper script sometrigger.dev.sh
And copy the contents of pydev into /p4/common/bin/triggers/pydev
So now on any client when I do a 'p4 mytriggercommand' , it connects
back to my eclipse client and I have full eclipse python debugging at my
I don't know if python has any built in remote development, but if it did it
might be good for Perforce to enable it in the p4python library. For now using
pydev gets it done for me.
Please click here to see the post in its original format:
perforce-user mailing list - email@example.com