Pycharm remote debugging is a combination of local and remote paths

I have a problem that I could not find the answer to.

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

I installed FTPS deployment and remote interpreter via ssh.

When I just run the application on a remote Raspberry Pi, there is no problem.

The problem occurs when I try to set a breakpoint. In this case, fucking 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 believes that the path to the application is the path on the remote computer + the path on the local computer.

Does anyone know which settings can cause this and how to fix it?

+5
source share
2 answers

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

Path mappings - This field appears if the remote interpreter is selected in the Python interpreter field. Click the browse button to determine the necessary mappings between local and remote paths. In the Edit Path Mapping dialog box, use the Add / Remove button command to create new mappings or delete selected ones.

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

+11
source

This may be obvious, but I was getting the same problem when using ~ instead of writing all the way to my home directory for remote mapping.

+3
source

Source: https://habr.com/ru/post/1204476/


All Articles