<div dir="ltr">So I filed an <a href="https://github.com/qgis/QGIS-Website/issues/215">"issue"</a> for the qgis web page regarding using pdb with qgis in that the proper imports weren't done.  However, I've moved forward and found that the code blows up when I try to drop my python plugin into the debugger.<div><br></div><div>So this code per <a href="http://docs.qgis.org/2.2/en/docs/pyqgis_developer_cookbook/ide_debugging.html#debugging-using-pdb">the documentation</a>:</div><div><br></div><div><div><div>        pyqtRemoveInputHook()</div><div>        pdb.set_trace()</div></div><div><br></div><div>Causes this:</div><div><br></div><div>
<p style="margin:0px"><span style="font-family:'Courier New,courier'">Traceback (most recent call last):<br>  File "/Volumes/ColettiData/MarkColettiHome/.qgis2/python/plugins/TweetTracker/tweet_tracker.py", line 385, in run<br>    self.__createPointLayer(self.dlg.selectedEventNames(), tweets)<br>  File "/Volumes/ColettiData/MarkColettiHome/.qgis2/python/plugins/TweetTracker/tweet_tracker.py", line 298, in __createPointLayer<br>    if self.iface.activeLayer() is not None and self.iface.activeLayer().originalName() is name :<br>  File "/Volumes/ColettiData/MarkColettiHome/.qgis2/python/plugins/TweetTracker/tweet_tracker.py", line 298, in __createPointLayer<br>    if self.iface.activeLayer() is not None and self.iface.activeLayer().originalName() is name :<br>  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/bdb.py", line 48, in trace_dispatch<br>    return self.dispatch_line(frame)<br>  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/bdb.py", line 67, in dispatch_line<br>    if self.quitting: raise BdbQuit</span></p><p style="margin:0px"><span style="font-family:'Courier New,courier'"><br></span></p><p style="margin:0px">I'd really rather avoid the annoyance of spraying print statements everywhere and rely on a proper symbolic debugger.  Surely others are able to use pdb for their qgis plugins?  If so, how do I make this work?</p><p style="margin:0px"><br></p><p style="margin:0px">Cheers!</p><p style="margin:0px"><br></p><p style="margin:0px">Mark</p><p style="margin:0px">-- <br></p></div><a href="mailto:mcoletti@gmail.com" target="_blank">mcoletti@gmail.com</a><br><div><br></div>
</div></div>