Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add vscode config to support itest debugging #826

Draft
wants to merge 3 commits into
base: 0-19-staging
Choose a base branch
from

Conversation

jharveyb
Copy link

@jharveyb jharveyb commented Aug 23, 2024

This PR adds a debug target for VSCode users to make itest debugging easier.

Breakpoints in the itest work as expected, and with some changes you can also step into the subprojects (tapd, lnd) being run as part of litd:

  • Update go.mod to use a local copy of the subproject repo; e.x.:

replace github.com/lightninglabs/taproot-assets => ../tap/tap

  • Set a breakpoint in an itest, right after all nodes are started.
  • Open a new window in the workspace of the subproject.
  • Use the 'Attach to process' debug target in that window to attach to a litd node started from the itest.

At that point, breakpoints in both windows should work as normal.

I think this would need some cleanup to be mergeable; I'm not sure if the itest case name could be fetched dynamiccaly from the task name. The subtasks could also be cleaned up a bit.

@dstadulis
Copy link

@sputn1ck Might be qualified to review

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

Successfully merging this pull request may close these issues.

2 participants