Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

adding a debug pulumi providers page #4006

Merged
merged 5 commits into from
Mar 7, 2024
Merged

Conversation

interurban
Copy link
Collaborator

@interurban interurban commented Mar 5, 2024

Description

fixes #2218

  • todo; get/create smaller vs code image with clean boxes

Checklist:

@interurban interurban requested a review from thomas11 March 5, 2024 23:25
@interurban interurban marked this pull request as draft March 5, 2024 23:25
@pulumi-bot
Copy link
Collaborator

Your site preview for commit c02e79c is ready! 🎉

http://pulumi-hugo-origin-pr-4006-c02e79ca.s3-website.us-west-2.amazonaws.com.

Copy link
Contributor

@thomas11 thomas11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with small remarks


### Starting the provider in debug mode

### Example for GoLand
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The two examples are on the same level ### than "Starting the provider"; should they be one lower?


![Screenshot of VS Code configuration for debugging providers](/docs/using-pulumi/pulumi-packages/img/vscode-debug-config.png)

Upon startup, the provider should output a port number to the console (e.g., `12345`), indicating it is ready for a debugger to attach.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence applies to all IDEs, not just vscode - can we make that clearer?

Once Pulumi runs or tests are initiated with the `PULUMI_DEBUG_PROVIDERS` environment variable set, your IDE should automatically attach to the specified port and pause execution at your set breakpoints.

{{< notes type="warning" >}}
**Terminating the Provider Process**: Be cautious when terminating the provider process as it can get out of sync with the actual cloud resources. When in doubt, `pulumi refresh` will address this.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it can get out of sync

Not sure if every reader understands what "it" is here. Maybe say "the Pulumi state".

Comment on lines 12 to 13
aliases:
- /docs/guides/pulumi-packages/how-to-debug-providers/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is a new doc, we don't really need an alias (we can always use keywords to hook additional Algolia search queries). I'd also suggest having the URL be named debugging-provider-packages.md, as "troubleshoot" doesn't really apply here (debugging is something that's done during the normal course of development).

Suggested change
aliases:
- /docs/guides/pulumi-packages/how-to-debug-providers/

@pulumi-bot
Copy link
Collaborator

Your site preview for commit 3f82adb is ready! 🎉

http://pulumi-hugo-origin-pr-4006-3f82adb8.s3-website.us-west-2.amazonaws.com.

@interurban interurban marked this pull request as ready for review March 7, 2024 00:28
@interurban interurban merged commit e839756 into master Mar 7, 2024
2 checks passed
@interurban interurban deleted the james/provider_debugging branch March 7, 2024 00:29
Copy link

github-actions bot commented Mar 7, 2024

Site previews for this pull request have been removed. ✨

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improvement : document how to debug a native provider with delve
4 participants