How do I debug Nova service with eclipse and pydev

I am trying to debug nova api and my breakpoints are ignored. I have eclipse, pydev and have rub devstack to get all the services. I kill the nova service and then I got to file nova-all > debug > python run, but no luck.

I have commented out eventlet.monkey_patch(os=False) and replaced it with eventlet.monkey_patch(all=False,socket=True,time=True,os=False) and added import sys;sys.path.append(r'/home/dev/.eclipse/org.eclipse.platform_3.7.0_155965261/plugins/org.python.pydev_2.7.3.2013031601/pysrc/') for file /nova/nova/cmd/__init__.py and I have then added import pydevd;pydevd.settrace() to the function I am interested in stepping into (above the breakpoint), again no luck...

I use devstack and eclipse pydev to debug openstack services using the remote debugging feature of pydev. I first install openstack using devstack. Then create a new project in eclipse pydev using the code available at /opt/stack/.
Once that is done, all openstack code is available in eclipse pydev.

All openstack services are available as screens and can be checked using the command screen -r

Now let us understand how to debug nova API service.

First check the location of for the directory "pysrc". Generally it is available in /opt/eclipse/plugins/org.python.pydev_2.7.4.2013051601/pysrc

Add this to the python path. This can be done by modifing /nova/nova/cmd/__init__.py

Open the debug perspective in eclipse pydev and start the debug server. Check the port on which debug server started. If the port is not 5678, replace the port in the above line of code with the port number on which debug server started

Now you need to restart the nova api service from screen. Enter screen -r and then goto to nova-api screen (which is screen 5) by entering CTRL+A followed by 5.

Once you are in nova-api screen, kill the nova-api service(CTRL+C) and the restart it by pressing "up" arrow and enter.
Once nova-api service is started, try to execute an api which will call the code which has the debug point, and the debug point will be hit.

I tried to debug the nova api stop instance by adding the debug code in the /nova/compute/api.py, definition stop as shown below