Skip to content

DAP: handle the process event #2114

Closed

Description

@lagergren

What

The process event carries name, systemProcessId, isLocalProcess, startMethod (launch, attach or attachForSuspendedLaunch) and pointerSize. There is no capability flag.

Why

Adapters that send it:

  • debugpy: its launcher (src/debugpy/launcher/debuggee.py:150-158); pydevd's (:567) is forwarded only when there is no launcher.
  • lldb-dap: on configurationDone and on restart (EventHelper.cpp:148).
  • Delve: on launch (server.go:1378) and for each spawned process (:4728).
  • netcoredbg: after the launch.
  • GDB: once, on the first thread or objfile event (dap/events.py:51-66).
  • MIEngine: AD7DebugSession.cs:3896-3916.
  • vscode-js-debug: only on its Visual Studio and flat-session paths.
  • Not sent: CodeLLDB, rdbg, java-debug.

What users miss: which process is being debugged, and its PID. That helps to attach a profiler or another tool, to find the process in a process list, or to check that a launch started the right executable. In launch mode the IntelliJ process handler is the adapter's process: DAPClient.exited keeps the program's exit code apart for that reason. So the IDE doesn't otherwise know the program's PID.

VS Code ignores this event (rawDebugSession.ts:163-164: case 'process': break;). This is a small extra, not parity.

Today

DAPClient.process calls LSP4J's empty default.

How it could be done

  • Print one line with debugProcess.print(..., ConsoleViewContentType.SYSTEM_OUTPUT) and a DAPBundle message, for example: "Debugging process '/path/app' (PID 1234, launched)". Leave out what the event leaves out. For a child session, add its configuration name (getConfigName()).
  • Keep the latest event in a volatile field of the DAPClient. Later uses: the Threads panel tooltip, the address width of the memory view (pointerSize, DAP: view and edit memory (readMemory, writeMemory and the memory event) #2112).
  • Threading: the event arrives on the LSP4J thread, and print already moves to the EDT.
  • Compatibility: one more console line, for adapters that send the event.
  • Docs: mark Process as supported in DAPSupport.md.

Test

  • Unit test, in the style of DAPDebugProcessConsoleTextTest: the text with and without a PID, a process that isn't local, each startMethod.
  • Session test: the server sends process, and the console has the line.

Effort and risk

Small, low risk. Open questions:

  • A console line only, or something in the UI?
  • One line for every process Delve spawns?

Activity

  1. added
    enhancement
    dap
    on Nov 22, 2026
  2. added this to the 0.30.2 milestone on Nov 23, 2026
  3. added a commit that references this issue on Nov 23, 2026
    862d0a7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dapenhancement

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions