Skip to content

Developer Debugging

For general troubleshooting of pfig configurations, see the Troubleshooting guide.

Developer Debugging Tools

When working on pfig itself, these tools can help:

# Enable debug logging
import logging
logging.basicConfig(level=logging.DEBUG)

# Inspect AST
from pfig import parse_pfig_source
ast = parse_pfig_source(config_text)
print(ast)

# Inspect compiled representation
from pfig.execution import ASTCompiler
compiler = ASTCompiler()
compiled = compiler.compile_file(ast)
print(compiled)

# Get materialized objects for inspection
from pfig import get_materialized_bindings
result = get_materialized_bindings(ast, entrypoint="my_binding")

VS Code Extension

A VS Code syntax highlighting extension for .pfig files is available. The extension repository is located at:

Repository: vscode-pfig

Further Reading