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

chore: add information on how to debug tfgen #4067

Merged
merged 3 commits into from
Apr 12, 2024
Merged

Conversation

corymhall
Copy link
Contributor

@corymhall corymhall commented Mar 18, 2024

This adds additional information on how to debug tfgen from the providers.

Adding the make commands in pulumi/ci-mgmt#851

Checklist:

  • I have reviewed the style guide.
  • [ ] If blogging, I have reviewed the blogging guide.
  • I have manually confirmed that all new links work.
  • [ ] I added aliases (i.e., redirects) for all filename changes.
  • [ ] If making css changes, I rebuilt the bundle.

This adds additional information on how to debug `tfgen` from the
providers.
@pulumi-bot
Copy link
Collaborator

Your site preview for commit 3924517 is ready! 🎉

http://pulumi-hugo-origin-pr-4067-3924517d.s3-website.us-west-2.amazonaws.com.

@corymhall corymhall requested a review from a team March 19, 2024 12:19
corymhall added a commit to pulumi/ci-mgmt that referenced this pull request Mar 19, 2024
This PR adds two commands to make debugging `tfgen` for bridged
providers easier.

1. `tfgen_build_only`: Only builds to `tfgen` binary, doesn't run
generate. When debugging if you need to rebuild tfgen, you don't need to
re-run all the other stuff too.
2. `debug_tfgen`: Starts `tfgen` as a debug server. Instructions on how
to debug `tfgen` are being added to the docs in
pulumi/pulumi-hugo#4067
For VS Code you can follow these steps to connect to the debugger.

1. Navigate to **Run -> Add Configuration** and add the **Go: Connect to server** configuration
![Screenshot of VS Code configuration for debugging providers](/docs/using-pulumi/pulumi-packages/img/vscode-launch-config-connect-to-server.png)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Small thing; can you add a space above and below the screenshot. thx!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@interurban when I do that I get the below lint error. It looks like I can add a line either above or below but not both.

themes/default/content/docs/using-pulumi/pulumi-packages/debugging-provider-packages.md:
Line 114: Ordered list item prefix [Expected: 1; Actual: 2; Style: 1/2/3].
Line 115: Ordered list item prefix [Expected: 2; Actual: 3; Style: 1/2/3].

Copy link
Collaborator

@interurban interurban left a comment

Choose a reason for hiding this comment

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

Thx @corymhall ; I added one small comment.

@pulumi-bot
Copy link
Collaborator

Your site preview for commit 02ab993 is ready! 🎉

http://pulumi-hugo-origin-pr-4067-02ab993f.s3-website.us-west-2.amazonaws.com.

@pulumi-bot
Copy link
Collaborator

Your site preview for commit ea9e5a4 is ready! 🎉

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

@corymhall corymhall merged commit bd59f8d into master Apr 12, 2024
2 checks passed
@corymhall corymhall deleted the corymhall/debug-tfgen branch April 12, 2024 12:47
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.

4 participants