Difference between revisions of "Manila/Debugging"
Line 11: | Line 11: | ||
[[File:manila_debug_local.png|200px|thumb|center]] | [[File:manila_debug_local.png|200px|thumb|center]] | ||
+ | <br /> | ||
− | 3. Invoke the debug configuration (Run-->Debug...->(config name). PyCharm will begin listening on the specified port. | + | 3. Invoke the debug configuration (Run-->Debug...->(config name)). PyCharm will begin listening on the specified port. |
4. Start the Manila service to be debugged using the pydev-debug-host switch, where the host is the system running PyCharm. If the default port (58786) isn't suitable, specify a different port using the pydev-debug-port switch. | 4. Start the Manila service to be debugged using the pydev-debug-host switch, where the host is the system running PyCharm. If the default port (58786) isn't suitable, specify a different port using the pydev-debug-port switch. | ||
[[File:Manila_debug_start_cli.png|200px|thumb|center|Start remote debug]] | [[File:Manila_debug_start_cli.png|200px|thumb|center|Start remote debug]] | ||
+ | <br /> | ||
+ | |||
=== Local debugging === | === Local debugging === | ||
Line 24: | Line 27: | ||
2. Create a local config. | 2. Create a local config. | ||
[[File:manila_debug_local.png|200px|thumb|center|Local debug config]] | [[File:manila_debug_local.png|200px|thumb|center|Local debug config]] | ||
+ | <br /> | ||
3. Invoke the debug configuration, which will start the relevant Manila service and route is console output to PyCharm. | 3. Invoke the debug configuration, which will start the relevant Manila service and route is console output to PyCharm. |
Revision as of 21:09, 23 June 2014
With the proposed changes in Manila, setting up source-level debugging should be straightforward. This page describes the process for PyCharm; feel free to enhance the content with other IDEs such as Eclipse/PyDev.
Remote debugging
1. Ensure your OpenStack environment has the pydevd library installed. This is distributed as an egg in the top level of the PyCharm installation directory; there are two separate eggs for Python 2.x and 3.x. For Python 2, just run "easy_install pycharm-debug.egg" to install it in your Python path.
2. Create a remote debug configuration in PyCharm (Run-->Edit Configurations...Python Remote Debug).
3. Invoke the debug configuration (Run-->Debug...->(config name)). PyCharm will begin listening on the specified port.
4. Start the Manila service to be debugged using the pydev-debug-host switch, where the host is the system running PyCharm. If the default port (58786) isn't suitable, specify a different port using the pydev-debug-port switch.
Local debugging
1. If PyCharm is running locally to OpenStack, local debugging is especially convenient. Install the pydevd egg as described above.
2. Create a local config.
3. Invoke the debug configuration, which will start the relevant Manila service and route is console output to PyCharm.