Pycharm calls remote server file problem

# Interpreter configuration issues

#folder mapping problem

# After modifying the file, how do the two correspond

Interpreter configuration issues

pycharm interpreter configuration
First create a file project (creating a project can have an interpreter, or there is no interpreter), you can directly click the lower right corner of the project and
insert image description here
click add to add, and call back to the following interface
insert image description here
SSH interpreter
insert image description here
insert image description here

folder mapping problem

insert image description here

Modify the file synchronization path
insert image description here
insert image description here
"" If there is no such file on the server, it will not work."
insert image description here
I choose, upload and synchronize, and I will synchronize the entire project to the server. l
insert image description here
Go to the service to see if there is
insert image description here
a re-run, and there will be a run As a result, of course he can also debug
insert image description here
and set the endpoint, the conventional method, you can see each variable

insert image description here
At present, it is found that after the local modification is completed, the code corresponding to the server segment will be automatically updated, and there may be few places I have changed.

What happens when a file is changed, or uploaded or downloaded?

next column

After modifying the file, how do the two correspond

Does ctrl jump?

If the package imported by import is available locally, you can jump to it by pressing ctrl,
or you can click to jump to it when an error message is prompted. If the file imported by import does not exist locally, the package can be changed on the server. content,

A red line will be prompted locally, but it does not affect the result
insert image description here

bold style

Rename files locally

After renaming, the server will not automatically change the file name and needs to be uploaded again.

file deletion

The local file is deleted, and the server segment does not change
insert image description here

local new addition

Added locally, the server will be added,
but the server will be added, and the local will not change. This will be used when adding a dataset

Read datasets that are not local

insert image description here

Contents in the upper directory

read, a file outside the mapped server

insert image description here

If you find that you need to click sync every time

Maybe you haven't turned on automatic synchronization, the above Upload is grayed out, and it becomes optional after it is turned on
insert image description here

how to get started

Want to run s1 results in running s2
insert image description here

Right click on the file and choose to run it
insert image description here
In short, pay attention to the interpreter in the lower right corner of the tool

Guess you like

Origin blog.csdn.net/yanhaohui/article/details/130626309