当前位置:网站首页>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 ,pycharmThe 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
边栏推荐
- Differences between MySQL BTREE index and hash index
- OMNeT学习之新建工程
- How to conduct application security test (AST)
- 5-minute NLP: text to text transfer transformer (T5) unified text to text task model
- linux上启动oracle服务
- Government cloud migration practice: Beiming digital division used hypermotion cloud migration products to implement the cloud migration project for a government unit, and completed the migration of n
- Gartner announces emerging technology research: insight into the meta universe
- 第十天 异常机制
- Change the icon size of PLSQL toolbar
- 深度学习100例 | 第41天-卷积神经网络(CNN):UrbanSound8K音频分类(语音识别)
猜你喜欢

Creation of RAID disk array and RAID5

DanceNN:字节自研千亿级规模文件元数据存储系统概述

Disk management and file system

如何建立 TikTok用户信任并拉动粉丝增长

Set cell filling and ranking method according to the size of the value in the soft report

Six scenarios of cloud migration

LVM与磁盘配额

建站常用软件PhpStudy V8.1图文安装教程(Windows版)超详细
![Oak-d raspberry pie cloud project [with detailed code]](/img/03/2d464d42614cd65877c645b60047ae.png)
Oak-d raspberry pie cloud project [with detailed code]

Gartner announces emerging technology research: insight into the meta universe
随机推荐
Gartner 發布新興技術研究:深入洞悉元宇宙
299. 猜数字游戏
Six scenarios of cloud migration
Use if else to judge in sail software - use the title condition to judge
Vim使用Vundle安装代码补全插件(YouCompleteMe)
Report FCRA test question set and answers (11 wrong questions)
UWA Pipeline 功能详解|可视化配置自动测试
5分钟NLP:Text-To-Text Transfer Transformer (T5)统一的文本到文本任务模型
299. Number guessing game
Redis "8" implements distributed current limiting and delay queues
451. 根据字符出现频率排序
What is the experience of using prophet, an open source research tool?
无线鹅颈麦主播麦手持麦无线麦克风方案应当如何选择
What does cloud disaster tolerance mean? What is the difference between cloud disaster tolerance and traditional disaster tolerance?
Execution plan calculation for different time types
OMNeT学习之新建工程
JIRA screenshot
JMeter setting environment variable supports direct startup by entering JMeter in any terminal directory
Matplotlib tutorial 05 --- operating images
Day 9 static abstract class interface