Hello, I didn't see an answer but it looks like de...
# general
b
Hello, I didn't see an answer but it looks like debug-ability of Pulumi programs is still not possible yet. Is that true? (based on this issue: https://github.com/pulumi/pulumi/issues/1372)
n
At least in Python I've been able to do some debugging by setting the environmental variable for it...standby while I look up what it is
b
I am mainly curious around JS/TypeScript and/or Go
b
console.log takes you a long way even if debugger is available 🙂
n
export PULUMI_TEST_MODE=true
b
@best-xylophone-83824 Sure but I don't think that's a replacement to be honest... The strength of using programming languages to do IaC in my honest opinion is the full tooling stack.
n
Try setting that and see if it works
Here's the error that was raised that led me there:
Copy code
raise RunError('Program run without the `pulumi` CLI; this may not be what you want '+
pulumi.errors.RunError: Program run without the `pulumi` CLI; this may not be what you want (enable PULUMI_TEST_MODE to disable this error)
Running debug mode in VSCode
b
@numerous-easter-93888 if I understand the error message though you aren't really running it against anything but the language run-time. Meaning you probably aren't getting meaningful information from the cloud provider on failures...
I am just kind of surprised the issue on github has been around for over a year, seems like a pretty critical feature to me. Not trying to belittle making it happen, I am sure it's not trivial...
b
I never encountered case where I'd wish I had a debugger.
w
FWIW - #1372 which would allow launching the user NodeJS program in “debug mode” is likely a very simple thing to add (just allow passing
—inspect
through to the
node
process via some new flag either on
pulumi up
or in
Pulumi.yaml
). PRs very welcome!
b
FWIW - This is really the only reason we aren't seriously considering using the product. If the feature was there it would be an easier sell as Terraform does not support that capability. However, if I ignore debugging then I might as well just stay with Terraform as it is more universally adopted.
b
typescript compiler catches a lot of errors already right when you type it in VSCode, so it is a net win even without debugger
b
so does terraform plugin
so its a draw imho
w
I'd love to see step debugger support. It would really assist learning the language - I'm not a native JS/TS developer - and the frameworks and libraries, both Pulumi specific and otherwise!
đź‘Ť 1