PyCharm Debugging: "frame not available" when stepping into _bootstrap.py
I'm using PyCharm with a Homebrew 3.6 python runtime in a VirtualEnv. I want to step through the Python runtime library code which implements `importlib.util.find_spec` function. I'm able to step into that function but when I attempt to step into the _find_spec helper which is in _bootstrap.py it doesn't track the source. The stack shows "frame not available" but I can step, and see the local variables update. Of the code shown in the editor is not tracking where the execution point is in that method but I can open the file and tell "manually" what line is being run by counting steps.
I'm assuming that this is related to the fact that _bootstrap.py is a CPython compiled module or something like that. Is there a way to get the PyCharm debugger to step this code?
Please sign in to leave a comment.
Hi! Thank you for the feedback! Unfortunately, it isn't possible, at the moment, but you can create a bug report in our issue tracker: https://youtrack.jetbrains.com/issues/PY
I saw this link that goes into some details that i would never understand. It doesn't have anything to do with this question, except for the fact that it starts to explain how code is imported, "The code is not imported in a traditional manner; instead the launcher code uses an exec statement for loading __init__.py files." and goes on from there.
What is the status of this. I don't understand the workaround suggested in relation to this issue. Here is a screen shot of what I am seeing.
It has a similar to what's reported. I also understand that some people, guru users, don't want to look at system files, or whatever. Well I am just starting out and I'm trying to figure out what the issue is.
What would I do so that Pycharm will stop saying 'Frame not Available'. When using Pycharm for Python 2.7 I don't have this issue.