-
Notifications
You must be signed in to change notification settings - Fork 68
Unable to open '<decorator-gen-660>': File not found (file:///.../myworkspace/<decorator-gen-660>). #1177
Comments
Same as #1071 |
Not quite the same, careful. They might have the same solution but they are different issues. The one you cited is for stepping over. This is stepping into in the first half, and notably there is no error message for stepping into. Also there is a failure even without stepping over - it is any break-point inside certain sections of the code. |
The inability to step into this function is most likely because you do not have debugging on the standard library enabled - everything that is in https://code.visualstudio.com/docs/python/debugging#_debugoptions The exact semantics of Step In is basically "run until a different line of Python code starts executing", excluding any code that belongs to the debugger itself, or to the standard library depending on the setting mentioned earlier. So in that sense it can never fail and doesn't have any errors to report, but it can be equivalent to a Step Over in the most extreme case - if all the code that's inside the call is excluded, or if there was no Python code to run at all (e.g. for native functions). So, if stdlib debugging is disabled, you cannot step into functions inside side-packages. However, if those functions in turn call some other code - e.g. your code via a callback - then that becomes the first different line of Python code when stepping in, and that's where the debugger stops. So if you step into something like In this particular case, though, the function is calling some other code that, so far as I can tell, it has generated dynamically at runtime. That code has So, the root cause for the error message that you see is the same as in #1071 - debugger should not stop on Python code that doesn't have a corresponding source file at all, regardless of what kind of step it's making. The expected behavior with steps as described would be to step over the line with OTOH, to be able to step into the implementation of |
Yep, that fixed the "no error message" part, I didn't have "configurations": [
{
"name": "Python: Current File (Integrated Terminal)",
(blah blah blah),
"debugStdLib": true
}, ... So never-mind, same issue as #1071. Also I learned so much from your post!! Thanks. |
Environment data
ms-python.python-2019.1.0
Actual behavior
I'm trying to debug-step-into the last line of this script:
with
Stepping into (
F11
) the functionnx.spring_layout
does not work. Nothing happens, no error message, nada. I right-clicknx.spring_layout
and click "go to definition", and it takes me to the correct file...\python37\lib\site-packages\networkx-2.2-py3.7.egg\networkx\drawing\layout.py
.So the inability to step into the execution is one distinct failure.
I try setting a breakpoint in that
layout.py
file:but when the breakpoint is hit, it results in the error
This may be related to #85 from a year ago
Expected behavior
Feature should work
Steps to reproduce:
The text was updated successfully, but these errors were encountered: