Following is the contributed tutorial from @namnh, a member of our Vietnam OpenStack Community. Please ping us if you have any questions.

This tutorial was created based on the last video tutorial "How to setup remote debugging with OpenStack Nova". Please see this video for more details:

And here is the tutorial for neutron:

In this archive, I will guide configuration to debug Neutron project by Pycharm-Pro5. And configuration with other projects are similar to Neutron project.

Step 1: Setup environment

We need two machines and topology as below:


- Machine 1 (called "Pycharm-Pro5"): Installing Pycharm-Pro5.

- Machine 2 (called "VM"): Installing Openstack-AIO by Devstack.


- We will use Devstack to install Openstack-AIO. This is [local.conf]( file.

Step 2: Configuration Pycharm on Pycharm-Pro5

Step 2.1: Setup Deverlopment by clicking Tools --> Deployment --> Configuration then click "+" to create a "Devstack".


(1): Type of connect to VM. We will choose SFTP.

(2): The address of VM.

(3): The account of VM.

(4): The password of VM.

Note: In this step, we should check to connect to VM by choice "Test SFTP connection..."

Then we jump "Mappings" tab. To configure mapping between Pycharm-Pro5 and VM is like image:


(5): This is local path on Pycharm-Pro5.

(6): This is path on VM.

Click OK.

Step 2.2: Setup project by clicking File --> Settings then choose "Project: neutron" (in this case, I am setting debug with neutron project, with other projects are similar.)

Choice "Project Interpreter" to add an interpreter remote by choice "Add remote":


After choice "Add remote", we have image:


Change to "Deployment configuration" then click "ssh://[email protected]:22" to connect to VM. In this time, we will receive message "Successfully ...."


We need to wait for a few time so that Pycharm download packet from VM.

Step 2.3: Configuration Python Debugger. In "Settings", we choose "Build, Execution, Deployment" --> "Python Debugger" then select "Gevent compatible"


After done, we click OK.

Step 3: Configuration debug with Neutron prject

In this step, I will configure debug with neutron-server. With other component or other project, they are similar.

Step 3.1: Create tab debug by clicking Run --> Edit Configurations then create a neutron-server debug like that:


Step 3.2: Configuration API-worker on VM

Because Pycharm-Pro5 debug only one process so we have to configure on VM so that neutron-server run only one process.

Edit configure file /etc/neutron/neutron.conf. At first line we change api_workers = -1 (note that in nova api configuration, the config for only one process api worker is osapi_worker = 1. The nova API daemon does not accept negative value).

Step 3.3: After changing configuration file, turn off neutron-server process on VM. (Hint: you can use rejoin-stack to do that).

Step 4: Start debugging

After finishing all steps. We can start debug by click "debug" button. Have fun !!!

Optional: If you want to locally debugging your openstack neutron, please apply monkey patch for eventlet for collecting debug information from openstack process. In neutron, edit file in neutron/common/ and modify line 32 from:



eventlet.monkey_patch(os=False, thread=False)


Happy debugging !

Click here to view this tutorial source on GitHub


VietStack team.