From ad03a0c8d9e5cb12d7eca89c345b2e38661102d2 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Tue, 18 Mar 2025 12:48:48 +0500 Subject: [PATCH] debugging docs - add section about debugging addon --- .../docs/guides/development/debugging.rst | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/src/bonsai/docs/guides/development/debugging.rst b/src/bonsai/docs/guides/development/debugging.rst index 4cecc46fef..a74331e1ec 100644 --- a/src/bonsai/docs/guides/development/debugging.rst +++ b/src/bonsai/docs/guides/development/debugging.rst @@ -5,6 +5,13 @@ This is a mini-guide to setting up an IDE and configuring it to debug Bonsai more easily. It is currently specific to this writers own system (Ubuntu) but this can be expanded by others. +.. warning:: + Attaching debugger to Blender may significantly decrease performance due to + the debugger overhead. + +VSCode Extension +-------------- + 1. **Install VSCode/VSCodium**: This will be system specific. I used the available snap package. @@ -125,4 +132,20 @@ this can be expanded by others. If you get to this point, congratulations! You will now be 1000% more effective when troubleshooting issues, and able to make many more contributions, fixes -and patches. \ No newline at end of file +and patches. + +Blender Addon + VS Code Debugger +------------------------------ + +Setting up debugging with Blender Addon is a bit simpler as it doesn't require Blender to be started in a special way +and debugger can be always attached later when it's needed. + +1. Install Hextant Python Debugger Blender addon from `official repository `_. + +2. Open IfcOpenShell repository in VS Code and setup configuration for attaching debugger `per the instructions `_. + +3. Start Debug Server in Blender (Blender -> System -> Start Debug Server) + +4. VS Code -> Run and Debug -> "Python Debugger: Remote Attach" in dropdown -> Start Debugging + +5. Now debugger is attached to Blender. You can set breakpoints in VS Code and use Debug Console.