Python debugger does not work for some installed packages

I have the following project structure:


I also have avro-python3 v.1.8.2 installed. imports avro modules in this way:

import avro
from import AvroTypeException
from avro.schema import RecordSchema

I'm trying to debug internals of However, any breakpoints I set in either avro/ or avro/ do not work. "Step Into" (F7) does not work either. Both breakpoints and "Step Into" work on other modules, including standard library modules (I tried e.g. with unittest). 

The only way I managed to make debugging work was by copying avro/ to avro/ and importing the latter instead of 

I tried invalidating IntelliJ Idea cache several times. Also tried removing avro/__pycache__ folder. 

The code of the avro modules is definitely executed because when I add print() traces inside, I can see them - but breakpoints still don't work. Occasionally, when I make changes in avro/, breakpoints start working there, but after another change - magically stop again. Seems to have no correlation with whether it matches the original file or not. None of these experiments made avro/ work. 


I use IntelliJ Idea Ultimate 2019.3.2 with Python plugin 193.6015.41. 


Didn't reproduce for me, I've installed avro 1.9.1 for python 2 and breakpoints work inside avro/

Can you provide more details? Specifically:

- Your version of avro? 

- Where did you place the breakpoint and which code do you run to reproduce the issue?

This may be obvious, but make sure that:

1. "Attach to subprocess automatically" is enabled in [File | Settings | Build, Execution, Deployment | Python Debugger]

2. Both "Do not step" checkboxes are disabled for Python in [File | Settings | Build, Execution, Deployment | Debugger | Stepping]


I have avro v.1.8.2 as I wrote in the original post. But I think I tried 1.9.1 and had the same problem. 

I guess all debugger settings were fine, because debugging worked perfectly for a copy of avro/ in the same directory. Please see the details in the original description. 

I wonder if this can be related to a similar issue I reported last year:

At the time, Tonya replied that it's a known bug and a fix would be released later. 


Please sign in to leave a comment.