Documentation/internal: document launch lifecycle#4353
Conversation
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
left a comment
There was a problem hiding this comment.
I don't know that we want this type of detailed documentation of internals.
|
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 |
|
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. |
Summary
Updates #1074.
debugger.NewDocumentation/internal/README.mdValidation
go test ./cmd/dlv/cmds ./service/rpccommon ./service/dap ./service/debugger ./pkg/proc -run '^$' -count=1git diff HEAD^ --checkAI 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.