Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remote debugging on PyCharm

My source code is stored on a remote machine and I want to remotely code and debug my Python source code. How should I configure PyCharm to enable remote debugging?

like image 595
Mike Montesines Avatar asked Oct 03 '22 22:10

Mike Montesines


2 Answers

For remote debug you need to copy the sources to your local machine, set up a project, configure deployment to the remote machine and add remote Python interpreter to run and debug on the remote system.

It's not possible to work with the source files that are not on the machine where PyCharm is running.

You can find details about deployment and remote interpreter configuration in PyCharm help.

like image 82
CrazyCoder Avatar answered Oct 12 '22 08:10

CrazyCoder


Just as @CrazyCoder say above.
You need to copy the sources to your local machine, set up a project, configure deployment to the remote machine and add remote Python interpreter.

But you can use remote Python interpreter to debug remote source code with set source code path mapping on (detail Ref)

Run | Edit Configurations...

I think remote debug means the interpreter and source code are all in the remote.

enter image description here

Or through vagrant with Pycharm Pycharm Configuring to work on a VM

like image 44
Honghe.Wu Avatar answered Oct 12 '22 09:10

Honghe.Wu