# Debugging Techniques I

Author: Zack M. Davis
Originally published: 2014-08-27
Category: computing
Tags: Python
Canonical URL: https://zackmdavis.net/blog/2014/Aug/debugging-techniques-i/

```python
#def my_problematic_function(x):
def my_problematic_function(x, call_count=[]):
    call_count.append(1)
    print("ZMD DEBUG call #{}".format(len(call_count)))
    import traceback; traceback.print_stack()
    result = do_stuff(x)
    etc()
```
