Skip to content

Documentation/internal: document launch lifecycle#4353

Open
puneetdixit200 wants to merge 1 commit into
go-delve:masterfrom
puneetdixit200:docs/1074-launch-lifecycle
Open

Documentation/internal: document launch lifecycle#4353
puneetdixit200 wants to merge 1 commit into
go-delve:masterfrom
puneetdixit200:docs/1074-launch-lifecycle

Conversation

@puneetdixit200

Copy link
Copy Markdown

Summary

Updates #1074.

  • add an internal note that traces CLI and DAP startup into debugger.New
  • document backend dispatch, native launch, target group setup, and cleanup ownership
  • link the new note from Documentation/internal/README.md

Validation

  • go test ./cmd/dlv/cmds ./service/rpccommon ./service/dap ./service/debugger ./pkg/proc -run '^$' -count=1
  • git diff HEAD^ --check

AI usage disclosure

OpenAI GPT-5 assisted with repository navigation, tracing the current startup code paths, drafting the documentation, and summarizing validation. I reviewed the referenced code paths, final documentation diff, and verification output before submitting.

Add an internal note that maps the CLI and DAP startup paths to
debugger.New, backend selection, native launch, target group creation, and
cleanup ownership.

Updates go-delve#1074

@aarzilli aarzilli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't know that we want this type of detailed documentation of internals.

@puneetdixit200

Copy link
Copy Markdown
Author

That makes sense. I based this on the older #1074 discussion where launch/attach was suggested as a possible starting point, but I can see how this level of internal path tracing could become maintenance-heavy.

I will hold off on expanding it further. If you do not want this kind of page in Documentation/internal, I am fine closing it. If a smaller shape would be useful, I can also shrink it to a short orientation page that only points to the main packages and avoids step-by-step lifecycle details.

@derekparker

Copy link
Copy Markdown
Member

Hello @puneetdixit200 thanks for sending in this patch! While I do share some of @aarzilli concerns around keeping this document up to date, I think that aside from some mention of constants and types used, the overall details and launch mechanics are unlikely to deviate in any substantially meaningful way. I could even see creating an agent skill which could trace these notes through the code and update it with any differences found, reducing the burden of keeping this document up to date. For these reasons, I am happy to merge this. I do think that it will be helpful not only for new contributors, but as additional context for AI agents as well, helping them to navigate the code.

To that end, would you mind adding some information to the CLAUDE.md file in the repo root pointing at this documentation to make it more easily discoverable by agents.

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.

3 participants