omegaconf-pydevd provides the optional pydevd plugin for OmegaConf objects.
This debugger integration is packaged separately from the main omegaconf
distribution so that the global pydevd_plugins namespace is only installed on
systems that explicitly opt into it.
pip install omegaconf-pydevdUse examples/debug_demo.py to inspect OmegaConf
objects in the debugger with omegaconf-pydevd installed.
Set a breakpoint on print(cfg) and inspect:
cfgcfg.greetingcfg.subprojectscfg.project
With omegaconf-pydevd installed:
- missing fields render as debugger values instead of surfacing a debugger-time exception while inspecting them
- interpolations are shown more clearly, including their resolved values
Use the OC_PYDEVD_RESOLVER environment variable to select which resolver to
install:
USER: default behavior, useful when debugging OmegaConf objectsDEV: useful when debugging OmegaConf itself and inspecting its internal data modelDISABLE: disable the OmegaConf resolver
Example:
OC_PYDEVD_RESOLVER=DEV python your_program.pyFrom this repository root:
pip install -r requirements/dev.txt -e .
pip install -e subprojects/omegaconf-pydevd
pytest subprojects/omegaconf-pydevd/tests