[Eric] running and debugging programs remotely (on lan)

RICHARD Georges-Emmanuel ger at aie-etudes.com
Thu Nov 4 17:13:17 GMT 2010


Hi Vincent,
   after reading your topic about remote debugging, I wonder if you 
managed to go the way you described, if so can you provide some feedback 
about your experience of remote debugging.
Up to now I managed to use:
- local debug  (I mean the default setting), you load a python script 
then use F5 to start the debugging session (which is the easiest way, 
and thanks again for Detlev to provide such a great IDE)
- passive debugging (let you start the debugging session from outside of 
Eric4), you first setup Eric4 -> Settings/Debug/General  check the 
passive mode, then restart Eric4, it will then be pending until you 
start from a shell (local or another computer) the debug client with 
your program as argument
                 python2.5 DebugClient.py -h 192.168.1.3 -- 
/root/MyProject/script/test.py
my script is executed and wait on the first line to continue the debug, 
all debugging functions are available (step_over, continue, until 
cursor, step out,..)

I admit, it's quiet good.
For my case instead of running the DebugClient.py (in command line) , I 
would like to start the debugging session directly from my program test.py.

I started to embedd those few lines, the program stop just after as I 
needed, all debugging functions are not available (ie: continue, and 
until cursor same behaviour as step over):

(I copied the eric4 DebugClient module into dbg_client a folder in my 
project to debug)

test.py:
     import os,sys
     print "Running program"
(...)
     import dbg_client.DebugClient
     DBG=dbg_client.DebugClient.DebugClient()
     DBG.startDebugger(host= '192.168.1.3',port= 42424,exceptions=True, 
enableTrace=True ,redirect=True) # 192.168.1.3 the IP address where 
Eric4 is running in passive mode
     print "Eric4 debugging yellow line is positionned here, and that's 
great"
(...)
     print "Debugger Started"

My next point is to use the Remote debugging option of Eric4, and try to 
see if it could match an easier way of usage, but no real idea how to 
handle the setup for now.


In advance thanks.
                             Joe



> On Montag, 10. Mai 2010, Vincent Schut wrote:
>> Hi, As Eric already provides remote debugging, and setting a possible 
>> 'custom' interpreter, I wondered about the following: I often develop 
>> some data processing script on my desktop, which will actually run on 
>> another computer on our lan (because or more processing 
>> power/memory). Would it be possible to configure eric such that it 
>> will launch (and debug if necessary) a certain script on a different 
>> computer (e.g. using ssh)? Or would this clash with autocompletion 
>> etc. (python packages installed are usually more or less the same on 
>> my desktop and the processing computer). I was thinking something 
>> like a custom python 'interpreter' proxy script that would login into 
>> the remote host (passwordless using a key) and run the script there 
>> (with path translation) or call the debugging client script with the 
>> right parameters. Feasible? Regards, Vincent Schut. 
> That should work with the "Remote Debugger". That can be configured on 
> the Debugger->General page of the configuration dialog for global use 
> or in the Project->Debugger->Debugger Properties on a per project 
> basis. However, I haven't used that function much. Regards, Detlev 

-- 
Asia relation
Taiwan: +886930319433



More information about the Eric mailing list