@@ -108,8 +108,26 @@ From within the `scmodding/tools/scdv/` folder:
poetry run python -m scdv
```
# Tips and Tricks
# PyCharm
## PyCharm Debugging
Setting up PyCharm to run SCDV is as simple as configuring the project's Python Interpreter to use the poetry virtual environment (this is in `scdv/.venv/`) and creating a Python run configuration to run the `scdv` module.
In addition, PyCharm can be used to debug the blender add-ons while they're running in Blender. To do this, follow these steps:
- Create a `Python Debug Server` configuration manually configure the port (e.g. 61482)
- Edit the scdv run configuration and add the following environment variable with the debug server port:
`SCDV_PYCHARM_DEBUG=61482`
- Launch Blender using the `Blender > Open Blender` menu action in SCDV.
This will trigger the SCDV Blender add-on to connect to the PyCharm debug server when it is loaded. This will trigger a breakpoint, and you can hit the continue button to let Blender continue to load. Breakpoints set within the blender add-ons will trigger when being used in Blender!
## Debug Environment Variables
There are a number of environment variables that can be set to adjust how SCDV runs for debugging purporses.