https://pulumi.com logo
b

bulky-policeman-29913

09/11/2019, 2:34 PM
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

numerous-easter-93888

09/11/2019, 2:35 PM
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

bulky-policeman-29913

09/11/2019, 2:36 PM
I am mainly curious around JS/TypeScript and/or Go
b

best-xylophone-83824

09/11/2019, 2:37 PM
console.log takes you a long way even if debugger is available 🙂
n

numerous-easter-93888

09/11/2019, 2:38 PM
export PULUMI_TEST_MODE=true
b

bulky-policeman-29913

09/11/2019, 2:38 PM
@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

numerous-easter-93888

09/11/2019, 2:38 PM
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

bulky-policeman-29913

09/11/2019, 2:42 PM
@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

best-xylophone-83824

09/11/2019, 2:48 PM
I never encountered case where I'd wish I had a debugger.
w

white-balloon-205

09/11/2019, 2:50 PM
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

bulky-policeman-29913

09/11/2019, 3:00 PM
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

best-xylophone-83824

09/11/2019, 3:36 PM
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

bulky-policeman-29913

09/11/2019, 3:55 PM
so does terraform plugin
so its a draw imho
w

worried-city-86458

09/11/2019, 6:37 PM
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