Skip to content

Write compiled AST to temp file when CGX_DEBUG is set#175

Draft
berendkleinhaneveld wants to merge 1 commit into
masterfrom
debug-actual-file
Draft

Write compiled AST to temp file when CGX_DEBUG is set#175
berendkleinhaneveld wants to merge 1 commit into
masterfrom
debug-actual-file

Conversation

@berendkleinhaneveld

Copy link
Copy Markdown
Collaborator

When CGX_DEBUG is enabled, write the formatted generated Python source to a temporary file and use it as the compile filename. The formatted source is reparsed so line numbers in the code object match the file on disk, allowing debuggers (pdb, PyCharm, VS Code) to step through the generated render methods with correct source display.

When CGX_DEBUG is enabled, write the formatted generated Python source
to a temporary file and use it as the compile filename. The formatted
source is reparsed so line numbers in the code object match the file on
disk, allowing debuggers (pdb, PyCharm, VS Code) to step through the
generated render methods with correct source display.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant