O'Reilly logo

Mastering QGIS by GISP Dr. John Van Hoesen, GISP Dr. Richard Smith Jr., GISP Kurt Menke, Dr. Luigi Pirelli

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Debugging session example

Here, we will show how to debug the TestPlugin remotely. We'll also learn how to insert a code breakpoint, to stop executions, and to show variable values during executions.

The steps to follow are as follows:

  1. Create a PyDev project that points to the source code of the TestPlugin.
  2. Add a breakpoint to the TestPlugin run() function in the Aptana Debug Perspective.
  3. Start the PyDev Debug server.
  4. Connect to the PyDev server from QGIS.
  5. Run the plugin.
  6. Explore the variable values.
  7. Continue the execution of the plugin.

Creating a PyDev project for TestPlugin

To be able to add code breakpoints it's necessary to load test_plugin.py. This can be simply opened as a file, but it's better to learn how to have a view of the entire plugin as ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required