当前位置:网站首页>Pycham connects to the remote server and realizes remote debugging
Pycham connects to the remote server and realizes remote debugging
2022-04-23 16:36:00 【Sink the wine cup and fleeting time】
Pycharm Connect to the remote server and realize remote debugging
Connect to remote server
1、 Click on Tools
( Tools ), Click on Deploy Deployment
( Deploy ), Click on Configuration
( To configure )
2、 Add a new one SFTP Link to agreement
3、 Name the link
4、 Configure server information
choice Connection
tab page , Enter the remote server address 、 User name and password , Click on Test Connection
( Test connection )
If the pop-up connection is successful , Indicates that the connection to the remote server is configured successfully
5、 Configure synchronization content
choice Mappings
tab page , Configure the path where the local project is located and the path where the remote server project is located . In this way, as long as one party makes modifications , Code can be synchronized manually
6、 Open at terminal SSH Connect
Click on Tools
( Tools ), Click on Deploy Start SSH session
Select the remote server to connect to
If pycharm
Of Terminal
The terminal displays the corresponding server information , Indicates that the remote server is connected , It can be the same as in the server terminal , To operate
Be careful : If pycharm
Of Terminal
Chinese garbled code appears on the terminal , Then it needs to be modified pycharm
Of Tools
To configure
Click on the top left corner Files
→ Settings
, Click on Tools
, Change the format to utf-8
7、 View the remote server directory structure
Click on Tools
( Tools ), Click on Deploy Deployment
( Deploy ), Click on Browse Remote Host
( Browse remote hosts )
stay pycharm
Of You can view the directory structure of the remote server on the right
Synchronization code
Click on Tools
( Tools ), Click on Deploy Deployment
( Deploy )
-
If you want to synchronize your code to a remote server , Click on
Upload to deepin
(deepin Is the name of the remote host ) -
If you want to pull code from a remote server , The click
Download from deepin
(deepin Is the name of the remote host ) -
If I check that
Automatic Upload (always)
, that , You modified the code locally ,pycharm
The code will be automatically synchronized to the remote server ( This is not recommended in real projects , Will cause code conflicts , Of course , Will be used in real projects git. Your own private server doesn't matter )
Configure the remote interpreter for debugging
In some cases , In the remote server ,python Some library versions of the interpreter are inconsistent with the local version , perhaps Windows Some libraries and Linux Some libraries under are different , It will cause the code to run normally locally , But running on the remote server is abnormal .
This situation , You can go to pycharm Configure... In the remote server in python Debug the interpreter
1、 Click on the top left corner Files
→ Settings
, Click on Project Interpreter
, Click on Add
2、 choice SSH Interpreter
, choice Existing server configuration
, Select the remote server
3、 To configure Python The path of the interpreter
In general , Selected Python The interpreter version is python3, Path is /usr/bin/python3
If the virtual environment is also configured on the remote server , Then you can select the directory where the virtual environment is located python3 file
版权声明
本文为[Sink the wine cup and fleeting time]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231402128548.html
边栏推荐
- 关于 background-image 渐变gradient()那些事!
- 七朋元视界可信元宇宙社交体系满足多元化的消费以及社交需求
- [pyGame games] how did angry birds, a mobile game that became popular all over the world 10 years ago, dominate the list? Classic return
- LVM与磁盘配额
- Postman batch production body information (realize batch modification of data)
- Best practice of cloud migration in education industry: Haiyun Jiexun uses hypermotion cloud migration products to implement progressive migration for a university in Beijing, with a success rate of 1
- Countdown 1 day ~ 2022 online conference of cloud disaster tolerance products is about to begin
- Use if else to judge in sail software - use the title condition to judge
- Flask如何在内存中缓存数据?
- Day (6) of picking up matlab
猜你喜欢
Matplotlib tutorial 05 --- operating images
homwbrew安装、常用命令以及安装路径
英语 | Day15、16 x 句句真研每日一句(从句断开、修饰)
OMNeT学习之新建工程
299. 猜数字游戏
Oak-d raspberry pie cloud project [with detailed code]
Postman batch production body information (realize batch modification of data)
451. 根据字符出现频率排序
On the security of key passing and digital signature
Cartoon: what are IAAs, PAAS, SaaS?
随机推荐
Use itextpdf to intercept the page to page of PDF document and divide it into pieces
JMeter setting environment variable supports direct startup by entering JMeter in any terminal directory
About background image gradient()!
VMware Workstation cannot connect to the virtual machine. The system cannot find the specified file
如何建立 TikTok用户信任并拉动粉丝增长
Cloud migration practice in the financial industry Ping An financial cloud integrates hypermotion cloud migration solution to provide migration services for customers in the financial industry
Force buckle-746 Climb stairs with minimum cost
Query the data from 2013 to 2021, and only query the data from 2020. The solution to this problem is carried out
Best practice of cloud migration in education industry: Haiyun Jiexun uses hypermotion cloud migration products to implement progressive migration for a university in Beijing, with a success rate of 1
451. 根据字符出现频率排序
04 Lua 运算符
众昂矿业:萤石浮选工艺
Gartner 發布新興技術研究:深入洞悉元宇宙
Hypermotion cloud migration completes Alibaba cloud proprietary cloud product ecological integration certification
JSP learning 1
PHP 零基础入门笔记(13):数组相关函数
Six scenarios of cloud migration
计组 | 【七 输入/输出系统】知识点与例题
Detailed explanation of UWA pipeline function | visual configuration automatic test
如何进行应用安全测试(AST)