-
-
Notifications
You must be signed in to change notification settings - Fork 332
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
Attach debugger to pyrevit process when creating extension scripts #593
Comments
@buckettt Please fill in the questions above. The title doesn't tell me much |
@eirannejad Apologies I thought I had filled it in... |
Implemented in 4.8.1 |
(Please redirect me if I'm out of place here) Looking for the PyRevit debugger. From this it seems like there is a debugger implemented, but I have been having trouble finding anywhere that describes how to use it. Any suggestions? Most of the forums I find talk about using print statements or such, so hoping for something that would allow me to set breakpoints in my code. Maybe that's not the kind of debugger this is, but if someone could redirect me where to look. For reference, I have a decent amount of coding experience, just haven't had the time to go hunting through the entire repository file by file. |
You have to add the following line where you want to start the debug: import pdb; pdb.set_trace() This is just the standard, built-in way to debug python code; it will open up an output window with some useful buttons. To learn how to use it, follow one of the guide you can find with google. I encountered an issue a while ago (you can see it here), so be aware that using the debugger can cause some crash that is unrelated to your script. |
Is your feature request related to a problem? Please describe.
When creating custom scripts and extensions the current debugging process is tactically placed print statements and inspection of the logs. This can make the process longer than necessary when compared to using more typical debugging methods.
Describe the solution you'd like
The ability to attach a debugger to the pyrevit script process. Alternatively launch the process from an IDE (Visual Studio Code). This could allow easier inspection of variables and the inclusion of breakpoints to efficiently debug and develop new scripts.
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: