I have a stack defined in TS and cannot understand what is going on.
Is there a way to attach Visual Studio Code debugger to pulumi?
The Visual Studio debugger can help you navigate through code to inspect the state of an app and show its execution flow. You can use keyboard shortcuts, debug commands, breakpoints, and other features to quickly get to the code you want to examine.
To set a breakpoint in source code, click in the far left margin next to a line of code. You can also select the line and press F9, select Debug > Toggle Breakpoint, or right-click and select Breakpoint > Insert breakpoint. The breakpoint appears as a red dot in the left margin.
You can attach the Visual Studio debugger to a running process on a local or remote computer. After the process is running, select Debug > Attach to Process or press Ctrl+Alt+p in Visual Studio, and use the Attach to Process dialog to attach the debugger to the process.
To attach to a process on your local computer: In Visual Studio, select Debug > Attach to Process (or press Ctrl+Alt+P) to open the Attach to Process dialog box. In the Available processes list, find and select the process or processes you want to attach to. In the Attach to field, make sure the type of code you plan to debug is listed.
To debug a process on a remote computer, see Attach to a process on a remote computer. To attach to a process on your local computer: In Visual Studio, select Debug > Attach to Process (or press Ctrl+Alt+P) to open the Attach to Process dialog box. Connection type should be set to Default.
Install Pulumi provider: arch -x86_64 pulumi plugin install resource {provider_name} v {version} (where {provider_name} is the name of the provider, i.e. aws and {version} is the same version number that your package has updated to) * Login to Pulumi using the appropriate backend (see our docs for information)
Starting in Visual Studio 2019, you can attach the Visual Studio debugger to a process running on a Docker container. For a Linux .NET Core Docker container, see Attach to a process running on a Linux Docker container. For a Windows Docker container, see Attach to a process running on a Windows Docker container.
There appears to be an open issue on this since May 2018. Looks like there is still a lot of work to be done to enable this.
https://github.com/pulumi/pulumi/issues/1372
My vscode version:
❯ code --version
1.63.0
7db1a2b88f7557e0a43fec75b6ba7e50b3e9f77e
x64
package.json
:
Notice the "debug" prompt above the scripts section. In between lines 5 and 6. You can click that and vscode will open up a debug console. Works perfectly.
You can use in javaScript Debug Terminal. This can be found in the left panel of visual Studio Code, precisely the run option. This option offers a JavaScript Debug Terminal button, this will open a new terminal with attached debugger. This work for me
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With