Remote Debugging
I have a small script to remotely debug a memory leak, on the raspi. I have no gui on the raspi. I know how to import and pydev.pydevd.settrace(<host name>, port=<port number>)
is <hostname> = raspi ?
can I pip install pydev on the Raspi?
can I then run Pycharm remotely and connect?
Please assist.
C-:
is <hostname> = raspi ?
can I pip install pydev on the Raspi?
can I then run Pycharm remotely and connect?
Please assist.
C-:
Please sign in to leave a comment.
<hostname> is a name of the host where Pycharm is running.
You don't need to install pydev on the Raspi you can just copy pycharm-debug.egg and add it to the PYTHONPATH.
You don't need to run PyCharm remotely, it should be running on your local machine.
Module structure has changed recently in pycharm-debug.egg so it is just:
import pydevd
pydevd.settrace(...)
Btw if you have SSH/SFTP access to your Raspi you could try using the feature called Remote Interpreter - it should make remote debugging easier.
Feel free to ask if you have any questions.
I only have SSH at the moment. This means to copy the .egg is a challenge for a noob like me.
Is the remote interpreter the right way to debug the memory leak?
C-:
C-:
Failed modules
Remote Python 2.7.3(ssh://pi@10.0.0.3:22/usr/bin/python)
RPi.GPIO
pygame._numericsndarray
pygame._numericsurfarray
Generation of skeletons for the modules above will be tried again when the modules are updated or a new version of generator is available.
Can I proceed?
ssh://pi@10.0.0.3:22/usr/bin/python -u /home/pi/.pycharm_helpers/pydev/pydevd.py –multiproc –client '0.0.0.0' –port 56359 –file /home/cornie/Dropbox/Calibration/display/serv-clnt/dserver.py
bash: line 0: cd: /home/cornie/Dropbox/Calibration/display/serv-clnt: No such file or directory
pydev debugger: process 5393 is connecting
Connected to pydev debugger (build 125.92)
pydev debugger: warning: trying to add breakpoint to file that does not exist: /home/cornie/Dropbox/Calibration/display/serv-clnt/dserver.py (will have no effect)
...etc
How do I load the correct file please from:
ssh://pi@10.0.0.3:22/home/pi/display/dserver.py
please?
C-:
3 16:26:56 2013-04-17
pydev debugger: warning: trying to add breakpoint to file that does not exist: /home/pi/display/dclient.py (will have no effect)
pydev debugger: warning: trying to add breakpoint to file that does not exist: /home/pi/display/dclient.py (will have no effect)
By the way, breakpoints are not _that_ important at this stage, how do I find memory leaks!
C-:
I will follow any suggestions carefully, thanks!
C-:
Note that you can't edit the program remotely, you need to edit it locally and upload then to the remote server.
To understand why can't you set breakpoints I need to know do you have the file /home/pi/display/dclient.py
To check this out you can run ssh terminal using Tools | Run SSH Terminal action and write there ls /home/pi/display/dclient.py
does not exist remotely. See config below?
Had the dserver.py file synchronised as well as mapped:-{
Will now start debugging the memory leak, thanks again, great service!
C-: