Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remote debuging on Pycharm is concatenating local and remote path

I have a problem that I haven't been able to find an answer to.

I'm trying to debug a Python program running on a Raspberry Pi. The source code is located on my PC.

I set up an FTPS deployment and remote interpreter over ssh.

When I just run the app on the remote Raspberry Pi there are no problems.

The problem appears while I try to set up a breakpoint. In this case pydev writes:

>pydev debugger: warning: trying to add breakpoint to file that does not exist:
/home/pi/python/f:/python projects/server/server.py (will have no effect) 

Pycharm thinks that the path to the app is the path on the remote computer + the path on the local computer.

Does anyone know what setting might be causing this and how to fix it?

like image 313
Roman Vasilchenko Avatar asked Oct 11 '14 15:10

Roman Vasilchenko


2 Answers

From Run/Debug Configuration: Python section of PyCharm 3.4.0 Web Help:

Path mappings – This field appears, if a remote interpreter has been selected in the field Python interpreter. Click the browse button to define the required mappings between the local and remote paths. In the Edit Path Mappings dialog box, use add/delete buttons to create new mappings, or delete the selected ones.

Configuring this option in your debug configuration should solve your problem.

like image 151
Piotr Dobrogost Avatar answered Oct 15 '22 07:10

Piotr Dobrogost


Maybe it's obvious, but I was getting the same problem when using ~ instead of writing out the whole path of my home directory for the remote mapping.

like image 39
user3018549 Avatar answered Oct 15 '22 05:10

user3018549