You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@fabloz I was able to perform the steps you proposed and with the new version of debugpy, the debugger now crashes instead of freezing. I created a very simple python setup for you in order to validate whether the problem is fixed. If you require more information let me know.
Example python scripts
is_scalar.py module
importtorchimportnumpyasnpdefis_scalar(obj):
"""Recursive function that checks whether a input Args: obj (object): Object for which you want to check if it is a scalar. Returns: boole: Boolean specifying whether the object is a scalar. """# Check if obj is scalariftype(obj) in [int, float]:
returnTrueeliftype(obj) ==np.ndarray:
ifobj.__len__() >1:
returnis_scalar(obj)
else:
returnFalseeliftype(obj) ==torch.Tensor:
ifobj.__len__() >1:
returnis_scalar(obj)
else:
returnFalseeliftype(obj) ==str:
returnobj.isnumeric()
else:
returnFalse
@fabloz I was able to perform the steps you proposed and with the new version of
debugpy
, the debugger now crashes instead of freezing. I created a very simple python setup for you in order to validate whether the problem is fixed. If you require more information let me know.Example python scripts
is_scalar.py module
test_debugger.py script
Steps to reproduce (Also see gif)
test_debugger.py
andis_scalar.py
script in the same folder.test_debugger
script while placing a breakpoint on the pass statement.test_array = np.array(2)
.test_array
and see the debugger hanging in the old debugpy version.debugpy
the debugger crashes while giving the following error:IndexError: too many indices for array
Gif
Full Error message
To see the full error message go to this gist.
Debugpy (old version) logs
The logs for when I'm using the old version can be found in this gist.
Debugpy (new version) logs
The logs for when I'm using the new version can be found in this gist.
The text was updated successfully, but these errors were encountered: