Skip to content
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

Allow the creation of an MCprep build with proper debugging #604

Closed
StandingPadAnimations opened this issue Jul 20, 2024 · 2 comments · Fixed by #605
Closed

Allow the creation of an MCprep build with proper debugging #604

StandingPadAnimations opened this issue Jul 20, 2024 · 2 comments · Fixed by #605
Assignees
Labels
enhancement Feature requests or new functionality suggestions
Milestone

Comments

@StandingPadAnimations
Copy link
Collaborator

As MCprep is an extremely complex addon, debugging using traditional means in Blender is incredibly difficult. Some of the bugs in #601 were extremely deep level bugs that were incredibly difficult to debug normally. Each time we wanted to check a different variable, we had to modify print statements and rebuild the code, which is slow when a bug involves assets.

In an ideal world, Blender would come with a Python debugger that would allow us to analyze multiple things at once, and would allow the use of breakpoints. With the addition of Blender Extensions however, it might be possible to allow the creation of a debug build that uses https://github.com/microsoft/debugpy, and allow us to attach to it from an editor that supports it (VScode natively, Neovim with https://github.com/HiPhish/debugpy.nvim, etc). Then we could add a debug-build action that includes these wheels into the MCprep build, and otherwise excludes them at runtime. This would allow for much more advanced debugging in MCprep.

Some requirements:

  • Any version of Blender with Python 3.8+ (as of writing); Blender 4.2 should be fine with this requirement
  • The ability to build MCprep as an extension; this is possible right now in BpyBuild, so long as we include a blender_manifest.toml file in the MCprep_addon directory (though manifest verification has not yet been merged in BpyBuild)
    • The reason the ability to use MCprep as an extension is important is because Blender now natively supports using third-party packages in extensions by bundling wheels into the extension.
@StandingPadAnimations StandingPadAnimations added the enhancement Feature requests or new functionality suggestions label Jul 20, 2024
@StandingPadAnimations StandingPadAnimations self-assigned this Jul 20, 2024
@StandingPadAnimations StandingPadAnimations changed the title Allow the Creation of an MCprep build with Proper Debugging Allow the creation of an MCprep build with proper debugging Jul 20, 2024
@StandingPadAnimations
Copy link
Collaborator Author

:D
image

@StandingPadAnimations StandingPadAnimations linked a pull request Jul 21, 2024 that will close this issue
@TheDuckCow TheDuckCow added this to the v3.6.1 milestone Aug 14, 2024
@StandingPadAnimations
Copy link
Collaborator Author

Closing this as done, but we'll need to look further into making this more cross-platform

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests or new functionality suggestions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants