PyCharm 2019.1.3 (Professional Edition) problem with sync when debugging remotely using ssh interpreter

Hello,

 

I'm trying to debug my project on a remote machine using ssh interpreter.

I was able to setup ssh interpreter and requested to map local repository to the deployment path on a remote server.

During setup a mirror directory was successfully created on a remote machine, I was also able to successfully connect to the remote ssh interpreter.

However, later when modifying local repository, "File/Save All", and "File/Synchronize", I found out that local changes were not pushed to the deployment path.

Please let me know if this is expected behavior. I expected PyCharm to sync local modifications in the deployment folder and then execute them using remote ssh interpreter.

 

Thank you!

8 comments
Comment actions Permalink

Hi,

File > Synchronize loads changes from local disk. You need to use "Tools > Deployment", or right-click the project root/individual files and from the drop down menu select "Deployment > Download/Upload/Sync".

0
Comment actions Permalink

Hi Andrey,

Thank you for your reply.

Indeed, "Tools > Deployment > Upload to" worked.

However, I am confused whether it's an expected workflow to do it manually. I see that the option "Tools > Deployment >  Automatic upload (always)" is checked.

Please let me know.

Thank you!

0
Comment actions Permalink

The files should be uploaded automatically when you execute your code.

0
Comment actions Permalink

When I "Run" and "Debug" my code the sync doesn't occur.

0
Comment actions Permalink

Also make sure that local synchronization is enabled in "File | Settings/Preferences | Appearance & Behavior | System Settings".

Is your SSH interpreter configured properly?

 

If still not working, can you please provide your synchronization, deployment, and interpreter settings screenshots?

0
Comment actions Permalink

Andrey, the problem was that when I was setting "Upload changed files automatically to the default server" I didn't set the default deployment server.

Everything works now -- please close the ticket.

Thanks for your help!

P.S.

I still don't understand what is the difference between "File > Synchronize" and "Tools > Deployment > Sync with Deployed to". Does it perform the same action now that I set the default deployment server?

0
Comment actions Permalink

File > Synchronize - synchronize in-memory content (what you see in the editor) with the file. It's different from "Save" because it reloads the file if there was any external changes.

Tools > Deployment > Sync - synchronize with the remote host.

Easy as that.

0
Comment actions Permalink

Got it, thank you, Andrey!

0

Please sign in to leave a comment.