What is the difference between Path mappings in Python Interpreter and Mappings in Deployment


I notice there are two Paht Mappings setting in PyCharm Preferences, one in Project -> Python Interpreter and the other in Build, Execution, Development -> Development. What is the difference between them? When I use remote debugging, could I create just one for easier usability

Comment actions Permalink

Imagine having a deployment configuration to upload your code to one folder, but use your remote interpreter to run code from another folder. For such cases, you need to be able to specify different path mappings for your deployment config and the remote interpreter.

Sure, this example is not very realistic, but in more complicated scenarios one may use multiple deployment configs and remote interpreters.

>When I use remote debugging, could I create just one for easier usability

When you first configure your SSH interpreter, PyCharm automatically creates a deployment configuration with the same path mappings you defined for the interpreter. So it's automatic and you don't need to do anything else.

Comment actions Permalink

I am using PyCharm Professional 2020.2, in mac.

According to step 7 in https://www.jetbrains.com/help/pycharm/configuring-remote-interpreters-via-ssh.html#ssh, there should appear the "Sync folders" field, where one can configure the path mappings. Furthermore, there should be a checkbox to enable automatic upload of the local changes to the remote server.

In my case, these did not appear, and so I could not configure the path mappings at this stage. I could later configure the path mappings in Interpreter Settings. But I could still not enable automatic upload.

I got around this issue by having "Automatic Upload" checked in Tools->Deployment menu.

Is this the right way to set up automatic upload to remote server?

Comment actions Permalink

Yes, you should enable automatic upload to "Always", and make sure that you have a default deployment selected.


Please sign in to leave a comment.