[issue33044] pdb from base class, get inside a method of derived class

Ishan Srivastava report at bugs.python.org
Sat Mar 10 16:41:25 EST 2018


New submission from Ishan Srivastava <ishan.srt at gmail.com>:

I need to use `pdb.set_trace()` in the base class. It has a method:

```
def run(self, *args, **kwargs):
    raise NotImplementedError
```
Since this base class is derived by many subclasses I don't know before hand which class' `run()` method I need to get inside. Also there is some pre processing of the arguments given to the `run()` method. So when `pdb` reaches the line,

```
q=self.run(arguments)
```

and I hit `s` it acts as if I have given the command `next`.

How can I get inside the derived class' `run()` method with `pdb` and debug the code over there?

----------
components: Library (Lib)
messages: 313557
nosy: ishanSrt
priority: normal
severity: normal
status: open
title: pdb from base class, get inside a method of derived class
type: behavior
versions: Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33044>
_______________________________________


More information about the Python-bugs-list mailing list