1745529368
The debug tool ran validateLaunchProgram before adapter selection and rejected any directory program with `launch program resolves to a directory`, while dlv's default `mode=debug` requires a Go package path (a directory or .go source file). Every Go-module launch failed: passing the module dir was rejected outright, and passing the compiled binary failed at dlv with `not a valid go module`. - Add `acceptsDirectoryProgram` to DapAdapterConfig/DapResolvedAdapter and flag dlv in dap/defaults.json. - In DebugTool.execute(launch), resolve the adapter first, then call validateLaunchProgram with the resolved adapter — the directory rejection only fires when the adapter does not advertise the flag. - Add resolveLaunchOverrides in dap/config.ts: for dlv, derive `mode` from the program shape (directory or .go file → debug; other file → exec). Plumbed through DapLaunchSessionOptions.extraLaunchArguments and spread between adapter.launchDefaults and the hard-coded launch fields in session.ts. - Refresh tests: cover the no-dir-support adapter rejection, dlv on a package directory keeping mode=debug, and dlv on a binary switching to mode=exec. Fixes #2020