[Eric] Eric6 and Raspberry Pi
Detlev Offenbach
detlev at die-offenbachs.de
Sun Jan 27 10:26:17 GMT 2019
Hello Geert,
2. The eric archive contains the script 'install-debugclients.py' that
installs just the debugger backends and is meant exactly for your situation.
4. If the remote files are accessible locally (e.g. via samba on the RasPi)
there is no need to have a local file. Path translation is used to adopt the
remote path to the local one and vice versa.
5. Remote Host should be 'pi at 192.168.123.57' and Remote Execution should just
be 'ssh'. The Debug Client entry should use '/' instead of '\' as those are
used by Linux in directory and file paths. If the later doesn't work, please
let me know. Furthermore you should enable the 'Redirect stdin/stdout/stderr'
option in order to send all outputs via the debugger connection.
Detlev
Am Sonntag, 27. Januar 2019, 11:07:26 CET schrieb Geert Vancompernolle:
> Hi Detlev,
>
> Sorry it took a while before I picked up this thread, but lack of time
> didn't allow me to take next steps.
>
> So far, I've done the following steps:
>
> 1. I installed newest version of Eric6 (currently installed version:
> 19.01) on my Windows10 PC
> 2. I copied the directory "DebugClients" (located in
> ./Lib/side-packages/eric6) from my Windows10 PC onto my RPi in the
> directory /home/pi/eric6. So, I have /home/pi/eric6/DebugClients on
> my Raspberry Pi
> 3. I created a Python test directory on the Raspberry Pi like so:
> /home/pi/eric6/remotetests and I've put a very simple Python script
> in there: hello.py.
> This is the content:
> def main():
> print('Hello World')
>
> if __name__ == '__main__':
> main();
> 4. I've created an Eric6 project on my WindowsPC in the directory
> E:\AppData\Programming\Python\Eric6\RemoteRpiTest\ and added the
> same hello.py to the project.
> I find it a strange thing I have to do this, I was expecting to use
> the Python file on the Raspberry Pi to start debugging. So, what I
> tried was to add source files to the project coming from my remote
> Raspberry Pi. But that gave an error (log attached). I've also sent
> the error log to the e-mail address
> 'eric-bugs at eric-ide.python-projects.org'.
> Since that trick didn't work, I kept my local Python file.
> 5. In the Eric6 project, I've set the Debugger Properties window like
> in the attached file "Eric6RemoteDebuggerSettings.png":
> 1. I've referred to the DebugClients directory (and file) for the
> Debug Client section
> 2. My remote host is accessible from my Windows10 PC (command
> prompt) without having to pass my password using the command ssh
> 'pi at 192.168.123.57'. So, should be fine...
> 3. I've done path translations as per the image attached.
>
> However, when running the debugger, I don't see any feedback on the IDE
> and also can't debug...
>
> Then I tried the following:
>
> 1. Opening a DOS command box on my Windows10 PC
> 2. Run the command "ssh pi at 192.168.123.57 python3
> /home/pi/eric6/remotetest/hello.py"
> 3. That worked perfectly: I could run the Python script on my Raspberry
> Pi and get the results back on my DOS prompt. So, clearly the
> remote part is accessible using SSH and without providing a password.
> 4. I then added that command into the field "Remote Execution" of the
> Debugger Properties dialogue box in Eric6 and tried to debug the
> project again.
> Result: error message saying "Debugger backend could not be started"
> (see attached image "DebuggerBackendCouldNotBeStarted.png").
>
> I'm a bit "out of inspiration" now. Is there anything wrong in the
> setup(s) above? What else am I missing?
>
> Best,
> --Geert
>
> > Hello Geert,
> >
> > I haven't done this for a very long time but it should be possible. As a
> > first step you should install the debugger client on the RPi. Once that
> > is done you can configure everything on the debugger configuration pages.
> > I would like to get a HOWTO document for the eric web site about the
> > steps you did to get this working. The eric6 README file gives some hints
> > on this.
> >
> > Detlev
> >
> > Am Sonntag, 13. Januar 2019, 15:34:10 CET schrieb Geert Vancompernolle:
> >> Hi,
> >>
> >> Has anyone ever tried to remotely debug Python code running on a
> >> headless Raspberry Pi from a Windows (10) PC running the Eric6 IDE? Is
> >> that possible and if so, what is to be done?
> >>
> >> Such mechanism is available for Java code running on the RPi while using
> >> Netbeans on the PC to step through the code remotely running on the RPi.
--
Detlev Offenbach
detlev at die-offenbachs.de
More information about the Eric
mailing list