Open pd5rm opened 4 years ago
You can debug via unit tests.
app=core.App() # use constuctor to set context as needed. Also can set output directory of synthesized templates
stack = core.Stack(app) # put a breakpoint here
MyConstruct(stack, "customThing")
result = app.synth()
assert result.stacks[0] == expected_template
It appears that this is an issue that needs to be fixed in jsii. I'm going to move this issue over to that repository.
transferring to jsii
It would nice to be able to use built in 'pdb' Python debugger module to inspect/step through generation of template.
Use Case
This would allow us to use native breakpoints, instead of using print-log style debugging.
Proposed Solution
Other
Currently, when I use pdb, it fails with following trace:
I think this results from CDK trying to dump stuff to stdout and pdb expecting to handle user input from stdin.
This is a :rocket: Feature Request