Pycharm is a very powerful Python development tool, and now a lot of code is finally running on the online environment is Linux, and the development environment may be developed under Windows, which requires regular debugging on Linux, or in Linux to write code, And Pycharm offers a very convenient way. The code steps for implementing remote Linux development and debugging on Windows are as follows:
Configuring Remote Linux host Information
Select Tools--deployment--configuration
?
Here, you can choose SFTP.
?
Add the SFTP host information here and then you can test the connection, enter the user name and password
?
?
?
?
Here, the default root path can be
?
The local path is configured as your Windows native code path to
Deployment path on server This configuration is the route to the code on your Linux
Click OK to save after configuration is complete
?
At this time, you can see the information of your remote host by Tools--deployment--browse
?
?
Configuring Python for Remote Linux
?
?
?
So far, the configuration is complete, and the test begins with
Testing for writing code and debugging on remote Linux
I created a new hello.py file on remote Linux and printed Hello World
Then run on the pycharm on your local windows
?
Now I make changes to the code file, remember to finish writing the code and click the upload small arrow in the upper right corner, so that you change the code in time to upload to Linux, and then click on the Run
?
?
If you do not upload, this time you click on the left of the first icon for comparison, you will be able to see your current code and recently uploaded to the Linux code comparison, this is a very convenient feature
?
Pycharm Remote Linux development and debugging code