Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering QGIS

You're reading from   Mastering QGIS Go beyond the basics and unleash the full power of QGIS with practical, step-by-step examples

Arrow left icon
Product type Paperback
Published in Mar 2015
Publisher
ISBN-13 9781784398682
Length 420 pages
Edition 1st Edition
Tools
Arrow right icon
Toc

Table of Contents (12) Chapters Close

Preface 1. A Refreshing Look at QGIS FREE CHAPTER 2. Creating Spatial Databases 3. Styling Raster and Vector Data 4. Preparing Vector Data for Processing 5. Preparing Raster Data for Processing 6. Advanced Data Creation and Editing 7. The Processing Toolbox 8. Automating Workflows with the Graphical Modeler 9. Creating QGIS Plugins with PyQGIS and Problem Solving 10. PyQGIS Scripting Index

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 a PyDev project. This allows us to use Aptana as a debug and develop environment.

This is done in two steps:

  1. Creating a PyDev project in Aptana Studio 3.

  2. Linking the source code to the project.

Creating a PyDev project called TestPlugin is done by navigating...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image