Skip to content

Add netcoredbg debug adapter, dotnet locator, and runnables - #95

Merged
reflectronic merged 6 commits into
zed-extensions:mainfrom
Gambl3r08:add-netcoredbg-debugger
Nov 23, 2026
Merged

reflectronic merged 6 commits into
zed-extensions:mainfrom
Gambl3r08:add-netcoredbg-debugger

Conversation

@Gambl3r08

@Gambl3r08 Gambl3r08 commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Adds debugging support (#12) via the netcoredbg debug adapter, plus a dotnet
debug locator and test/main runnables.

What this does

  • netcoredbg adapter: downloaded from GitHub releases on first use, with a
    JSON schema for launch and attach, and a debugger.scm query for inline
    values while paused.
  • dotnet locator: turns a dotnet run task into build-then-debug. It
    finds the assembly with dotnet msbuild -getProperty:TargetPath — no shell
    scripts and no filesystem probing, which I believe solves the csproj
    discovery problem described in Add zed-netcoredbg to csharp extension, add runnables #43.
  • Runnables: gutter run buttons for [Fact]/[Theory]/[Test]/
    [TestMethod]/[TestCase] methods, test classes (including xUnit classes,
    detected by their contents since xUnit has no class attribute), and Main.

Deliberate limitations

  • The locator does not handle dotnet test: the test assembly is a VSTest-driven
    library, and launching it directly exits without running anything (verified).
    Instead there is a "wait for debugger" task using VSTEST_HOST_DEBUG=1, and
    the user attaches to the printed pid — same conclusion Add zed-netcoredbg to csharp extension, add runnables #43 reached.
  • MSBuild failures are reported from stdout as well as stderr, since MSBuild
    writes errors like MSB1003 to stdout with an empty stderr.

Relationship to #43: overlapping goal; this implementation needs no shell
scripting for project discovery. Happy to coordinate or merge efforts.

Fixes #12

@cla-bot cla-bot Bot added the cla-signed label Jul 30, 2026
@Gambl3r08 Gambl3r08 changed the title Add netcoredbg debug aAdd netcoredbg debug adapter, dotnet locator, and runnablesdapter support Add netcoredbg debug adapter, dotnet locator, and runnables Jul 30, 2026
@IldySilva

Copy link
Copy Markdown

this is a must ,

@reflectronic
reflectronic force-pushed the add-netcoredbg-debugger branch from 7326557 to 797dcbe Compare November 23, 2026 13:50
@reflectronic

Copy link
Copy Markdown
Contributor

Sorry for the delay in getting this PR integrated. I've tested it on Windows, and it seems to work well. Thank you!

I pushed some fixes to simplify the code and address some edge cases better. I've also removed the testing support from this PR; the proposed implementation doesn't feel great to use and had a lot of limitations. Doing it right would require some new capabilities in the Zed extension API, and I think it can be revisited separately from general debugging support.

@reflectronic
reflectronic merged commit b0b27af into zed-extensions:main Nov 23, 2026
5 checks passed
@MattParkerDev

Copy link
Copy Markdown

FYI, https://github.com/MattParkerDev/sharpdbg is a much more capable debugger for .NET - DebuggerDisplay support, runtime-async debugging support etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

debug support

4 participants