Repository navigation
feat: show the process which a DAP session debugs, with its PID, in the console - #2152
Merged
lagergren merged 1 commit intoNov 23, 2026
Merged
Conversation
…he console
A debug adapter's 'process' event names the process it debugs, with its
PID and how it was started. In launch mode the process of an IntelliJ
debug session is the debug adapter's, so the IDE didn't show the
program's PID anywhere. The console now prints a line for each 'process'
event, such as
Debugging process '/path/app' (PID 1234, launched)
leaving out what the event leaves out, and saying 'remote' for a process
which isn't local. The line of a child session started with
'startDebugging' names that session: the name of its configuration, or
else the run configuration's. DAPClient keeps the last event, for
getProcessEvent().
The user guide describes it, with a screenshot, and DAPSupport.md marks it as
supported.
Fixes redhat-developer#2114
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2152 +/- ##
==========================================
+ Coverage 53.22% 53.27% +0.05%
==========================================
Files 826 826
Lines 34717 34738 +21
Branches 7143 7152 +9
==========================================
+ Hits 18477 18506 +29
+ Misses 13468 13460 -8
Partials 2772 2772 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Collaborator
Author
|
@coderabbitai review |
Action performed
|
This was referenced Nov 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2114
What
A debug adapter's
processevent names the process it debugs, with its PID and how it started it.DAPClient.processcalled LSP4J's empty default, and in launch mode the IntelliJ process handler is the debug adapter's, so the program's PID showed nowhere.Change
DAPClient.processprints one line in the console (SYSTEM_OUTPUT,DAPBundlemessages), such asDebugging process '/path/app' (PID 1234, launched). Whatever the event leaves out is left out of the line.isLocalProcess: falseaddsremote, andstartMethodaddslaunched,attachedorlaunched suspended, then attached.pointerSizeis kept but not printed.startDebugging) ends within the session '<name>'. The name is thenameof the child's configuration, which is also what VS Code calls the child session (debugpy'sSubprocess <pid>, vscode-js-debug's target name). Without one, the run configuration's name is used. The issue suggestedgetConfigName(), but that returns the run configuration's name. Every session of a tree shares it, because a child client is created on the sameDAPDebugProcess.DAPClientkeeps the last event in a volatile field.getProcessEvent()returns it, for the later uses the issue lists (the Threads tooltip, the address width of DAP: view and edit memory (readMemory, writeMemory and the memory event) #2112).initialize.DAPSupport.md. The user guide has a new "Debugged process" section with a screenshot:Behaviour change
processevent was ignoredprocessevent: the process, its PID and how it was started, plus the session name for a child sessionBackward compatibility
Nothing changes with adapters that don't send the event (CodeLLDB, rdbg, java-debug). Adapters that send it (debugpy, lldb-dap, Delve, netcoredbg, GDB, MIEngine) get one more console line per event. Delve sends one for each process it spawns. The only API change is the new
DAPClient.getProcessEvent(); nothing is removed or changed.Test
DAPClientProcessMessageTest(light): the line with PID and start method, a PID that isn't grouped (1234567), leaving out a missing PID, start method or both, a local process, a remote one, eachstartMethod, an empty name, and the line of a child session.DAPProcessEventSessionTest(heavy, scripted DAP server over a socket). The console shows the line. The line leaves out what the event leaves out, and saysremote. The client keeps the last of two events. A child session's line names the session after its configuration'sname, or after the run configuration when there is none.Attaching .... The light test doesn't compile withoutgetProcessMessage.dappackage: 369 tests, 0 failures, 0 skipped on IC 2024.2, IC 2025.3 and IU 2026.3. Full suite on 2024.2: 2077 tests, 0 failures, 7 skipped (Windows-only and inline-completion tests, skipped on main too).