pyRevit
pyRevit copied to clipboard
pdb debugger crashes with "TypeError: Value cannot be null. Parameter name: del" using continue or enter
Describe the bug
When I try to debug a script using pdb, I'm not able to use the c(ontinue)
command or press enter to repeat the previous command.
pdb commands like p
and n
works fine.
The execution stops and a traceback comes up with the following message:
TypeError: Value cannot be null.
Parameter name: del
What I am trying to do is to analyze a particular configuration inside a loop that may occur after many cycles, so having to "n" through all the code is overkill.
To Reproduce
Run this simple script
import pdb
def debug_test(number):
return number + 5
def main():
for idx in range(5):
import pdb; pdb.set_trace()
result = debug_test(idx)
print(result)
main()
press c
to continue to the next loop iteration, the execution crashes with the aforementioned error.
This also happens when pressing enter, be it as soon as the debugger spawns or after using n
to repeat the command.
Expected behavior
Execution should continue
Desktop (please complete the following information):
- OS: Windows 10 21H2
- pyRevit Version 2021
- pyRevit Environment:
==> Registered Clones (full git repos)
==> Registered Clones (deployed from archive/image)
master | Deploy: "basepublic" | Branch: "master" | Version: "4.8.12.22247+0031" | Path: "C:\Users\aghensi\AppData\Roaming\pyRevit-Master"
==> Attachments
master | Product: "2021 First Customer Ship" | Engine: IPY2710 (2710) | Path: "C:\Users\aghensi\AppData\Roaming\pyRevit-Master"
==> Installed Extensions
openpyxl | Type: Unknown | Repo: "" | Installed: "C:\Users\aghensi\Documents\dev\pyrevitxxx\openpyxl.lib"
pyRevitXXX | Type: Unknown | Repo: "" | Installed: "C:\Users\aghensi\Documents\dev\pyrevitxxx\pyRevitXXX.extension"
==> Default Extension Search Path
C:\Users\aghensi\AppData\Roaming\pyRevit\Extensions
==> Extension Search Paths
C:\Users\aghensi\Documents\dev\pyrevitsws
==> Extension Sources - Default
https://github.com/eirannejad/pyRevit/raw/master/extensions/extensions.json
==> Extension Sources - Additional
==> Installed Revits
2021 First Customer Ship | Version: 21.0.0.383 | Build: 20200220_1100(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2021\"
==> Running Revit Instances
PID: 8476 | 2021 First Customer Ship | Version: 21.0.0.383 | Build: 20200220_1100(x64) | Language: 0 | Path: "C:\Program Files\Autodesk\Revit 2021"
==> User Environment
Microsoft Windows 10 [Version 10.0.19044]
Executing User: XXX\aghensi
Active User: XXX\aghensi
Admin Access: No
%APPDATA%: "C:\Users\aghensi\AppData\Roaming"
Latest Installed .Net Framework: 4.8
Installed .Net Target Packs: v4.0 v4.5 v4.5.1 v4.5.2 v4.6 v4.6.1 v4.7.2 v4.8 v4.8.1 v4.X
Installed .Net-Core Target Packs: v7.0.102
pyRevit CLI v4.8.12.22247+0031