03/30/2021, 10:06 PM
Has anyone got a functional launch.json or similar, to get debugging working with Pulumi?
Even partially working would be fine. If it could run my tests, it'd be great. I've never managed to get js debugging working, ever... must be because I run ts/node via Docker...


03/31/2021, 1:40 AM
@gorgeous-egg-16927 How do you guys test pulumi apps?


03/31/2021, 12:57 PM
@little-cartoon-10569 Yeah, this worked for me: It should probably be in the docs. I actually switched away from the suggested method of running a task as VScode complains about not having a problem matcher and their docs seemed daunting on that aspect. I also found it would occasionally get stuck and the output is missing. Instead I just
NODE_OPTIONS='--inspect-brk=' pulumi up --parallel=1
from the terminal and then
in vscode to launch the debugger.


04/01/2021, 1:12 AM
I haven't managed to figure any of that out. My use case is different.. I'm running mocha, not Pulumi, so it should be even easier.. but I'm just not getting it. Guess I've been stuck in the JVM too long.. new ways of working...
Found an "auto-attach" feature that suddenly makes stuff work...
The --inspect-brk= option that all the Pulumi docs mention just caused everything to hang. With that option gone, stuff ran but the debugger never attached. With this auto-attach (set to "smart"), I can now debug my tests.
👍 1
🎉 1