How to debug class in django models.py using PyCharm? -


im using latest pycharm 2016.2. working on django site several app, , want debug line in models.py:

models.py

class locationpolygon(models.model):     title = models.charfield(max_length=30)     mpoly = models.multipolygonfield(srid=4326, null=false, blank=false)     objects = models.geomanager()      def get_tooltip_title(self):         <some bugy code here>         return ""      def __unicode__(self):  # __unicode__ on python 2         return self.title + " | " + self.get_tooltip_title() 

i want debug line "some bugy code here" inside function "get_tooltip_title", when press debug button nothing happens , there exit code 1 in debug console...

i think models loaded before execution of views, check models while initialization of project. said can user break points anywhere in pycharms.

if not working manually break , trace execution using pbd. here , here post start on how use pdb.


Comments