-
-
Notifications
You must be signed in to change notification settings - Fork 345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debug support #2518
Comments
Hi @matyascsanady, I don't think there's a roadmap at all 😅 @eirannejad isn't active on the project anymore, and I don't see traces of debugpy in the code base, so it must have been something he tried locally but never released. And unfortunately IronPython seems to be unsupported by debugpy: microsoft/debugpy#523 (comment) We may have some chances with CPython/pythonnet, but at this time it doesn't support WPF/ There's also a debugger feature inside pyrevit that uses |
Hi @sanzoghenzo! Thank you for your quick response! I saw that IronPython does not support debugpy, so I’ve been trying with CPython. My issue seems to be with I also noticed that pyRevit implements a debugger ( |
I feel you, now that we are spoiled with graphical debuggers, why resorting to the hardcore, ugly, old tools? 🤣 Can you share what have you done so far here, or even better in the forum discussion? That way we might re-ignite the discussion on that topic, knowing what has been done and what didn't work. |
Okay so i got it working @sanzoghenzo
Where host by default is 127.0.0.1
The whole if statement is required otherwise it would start a new revit instance (dont ask me why...). debug.configure() is extremly important as debugpy has to be configured with the correct interpreter (this debugy issue) @sanzoghenzo this was the timeout issue i mentioned earlier
It is by no means perfect. As mentioned no WPF support (even if you import pyrevit.forms it dies).
is deconstructed in the VSC debugger like so
I did not have the time to test it properly just wanted to share my work in progress solution. |
That's good to read @matyascsanady ! One thing I should have mentioned, you could try with the WIP version that ships an updated version of pythonnet (version 3) and CPython 3.12 Also something that could help: maybe with this configuration VSC breakpoints will work |
Sorry for my absence @sanzoghenzo! I'll take a look at the WIP version (with the CPython 3.12 there is definitely no need to install an older version (1.5.1) of debugpy as i've mentioned earlier) and the stackoverflow post you sent, when I get the chance. |
As someone who regularly develops pyRevit extensions, I believe that adding debugger support would be a significant quality-of-life improvement for developers. Debugging pyRevit extensions can be challenging without a proper tool, and I’ve noticed that this topic has been previously discussed on the pyRevit forum (e.g., this thread on attaching the VS Code debugger).
From this forum post, it seems there was an interest in integrating debugpy to enable attaching the VS Code debugger. I’ve tried to implement this in my own extension, but could not make progress with it.
I’m curious if this feature is still on your roadmap. I understand that the team’s focus is likely on Revit 2025 compatibility, but implementing proper debugger support would greatly enhance the developer experience for the pyRevit community.
If there are any updates or guidance on how to integrate debugging capabilities in the meantime, I’d love to hear about them. Thank you for all your efforts in building and maintaining pyRevit!
The text was updated successfully, but these errors were encountered: