I have a AWS CDK application written in python. I want to debug this in VSCode. I do understand this would not be the normal convention. Since in my case cdk is installed globally and the cdk.json directs the global cdk to run my "app": "python3 app.py".. and at runtime cdk is using jsii to probably transpile python cdk into javascript to then convert to AWS Cloudformation.
With all that complexity stated, I should either be able to run the python debugger with correctly providing import aws_cdk as cdk... app = cdk.App() with the context. I can start the python debugger and pick up my venv/ with aws_cdk installed no problems, but it has no context. I cannot find any documentation on providing the context. using cdk.app(context={'key':'value}) returns app.node.get_all_context() = {}. I was then thinking I could start cdk and use VSCode to attach to the running process. I cannot run <global path>/node cdk syth since cdk is itself an executable and is supposed to be run cdk syth directly (I am on a MAC). One obvious additional test would be to run npm init and add cdk locally. That would help me use existing documentation on stackoverflow. Although that may work for me that is not desirable since I would have a npm setup for debugging plus a python setup for the app.
Python was chosen as the cdk language because there is more python experience than typescript in this app development. Although as I am reading it seems that python is a second rate language for aws cdk development.