Sometimes the project deployment will be some bug after the line, then you need to connect to a remote server to debug the code by local pycharm, to see if there is a problem.
step
-
Open Pycharm local project code -> select Tools -> Deployment -> Configuration ...
-
Click + -> select SFTP
-
Enter the name of any
-
Enter the address of the remote server
-
Switch to the Mappings
-
After the configuration looks good
-
After the above steps are finished configuring, and most important steps to configure a remote operating environment, otherwise it is impossible to debug remote code. Open Project Interpreter settings
-
Select SSH Interpreter, set up a remote server address
-
Setting up a remote server python path and the project path
-
Finish
Wait for the download of remote dependencies
-
After the download is complete click Run -> Debug
-
Set Ddit Config ...
-
Setting up a remote domain name server starts Debug
-
Set breakpoints, debug code on a bug in the code
ok, the above steps to complete the configuration Pycharm remote debugging code, now just initiated a request from a bug that will be able to enter the break, pleasant start debugging on the page.
Reproduced in: https: //www.jianshu.com/p/67b747cc07da