Skip to content

Add zed-netcoredbg to csharp extension, add runnables#43

Open
Tiggilyboo wants to merge 3 commits intozed-extensions:mainfrom
Tiggilyboo:feature/netcoredbg-and-runnables
Open

Add zed-netcoredbg to csharp extension, add runnables#43
Tiggilyboo wants to merge 3 commits intozed-extensions:mainfrom
Tiggilyboo:feature/netcoredbg-and-runnables

Conversation

@Tiggilyboo
Copy link

This PR adds debugging support #12 as originally implemented by https://github.com/qwadrox/zed-netcoredbg I merged this code over for debug use. It uses netcoredbg: https://github.com/Samsung/netcoredbg

My PR adds runnables which detect test files, so test fixtures and individual tests can be run or debugged.
netcoredbg_csharp_test_running

There is however one caveat, I can't seem to find a way to properly attach to the running test pid as we cannot inspect the process from within the extension. As seen in the screenshot below, the user can read and manually attach to the process id in the current implementation until a better solution is found. The only other way I can think of at the moment is to run the tests and output a temporary file which can be read by the extension, or somehow get the tcp connection working.

netcoredbg_csharp_test_showing_pid

Open to other ideas, but at least this is one step forward to integrated test runnables from the csharp extension...

From my git commit log for more details:

  • Use extension from https://github.com/qwadrox/zed-netcoredbg to have basic debug functionality with DAP and download netcoredbg for the running platform.
  • Add runnables and tasks to debug from test files. Captures for nunit, xunit, vstest. Not strict, purely functional (does not pair keywords) to test framework.
  • Currently unable to fully attach to runnable, but starts the vstest process so that it can be easily attached with PID listed in console

@cla-bot
Copy link

cla-bot bot commented Dec 22, 2025

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Simon Willshire.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@Tiggilyboo Tiggilyboo force-pushed the feature/netcoredbg-and-runnables branch from caf692f to 05e68e6 Compare December 22, 2025 22:17
@cla-bot
Copy link

cla-bot bot commented Dec 22, 2025

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Simon Willshire.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@Sathiyaraman-M
Copy link

Sathiyaraman-M commented Dec 27, 2025

Just wanted to mention that netcoredbg isn't officially supported in MacOS for ARM architecture.

@Tiggilyboo
Copy link
Author

Just wanted to mention that netcoredbg isn't officially supported in MacOS for ARM architecture.

Yea, was made aware of this asking permission from the zed-netcoredbg repository: qwadrox/zed-netcoredbg#6 (comment)

Currently the extension pulls from the netcoredbg releases which builds this, but ideally we do not pull from there...

Is it a hard requirement that the debugging extension works with all zed targets? ie. Get this one through with a "MacOS aarch64 is not supported at the moment"?

@Sathiyaraman-M
Copy link

Is it a hard requirement that the debugging extension works with all zed targets? ie. Get this one through with a "MacOS aarch64 is not supported at the moment"?

As long as it falls back gracefully in MacOS ARM64 devices, it should be fine. Also having an explicit note on this somewhere in the extension README would be nice.

@brendanmckenzie
Copy link

Not sure if it helps, but I've created a fork of the Samsung repo that keeps itself in sync with the upstream and automatically triggers builds of new releases. It builds for linux-x64, linux-arm64, macos-x64, macos-arm64 and win64.

See https://github.com/brendanmckenzie/netcoredbg/releases

@Tiggilyboo Tiggilyboo force-pushed the feature/netcoredbg-and-runnables branch from 05e68e6 to a78b794 Compare February 3, 2026 08:14
@cla-bot
Copy link

cla-bot bot commented Feb 3, 2026

We require contributors to sign our Contributor License Agreement, and we don't have @Tiggilyboo on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

- Use extension from https://github.com/qwadrox/zed-netcoredbg to
    have basic debug functionality with DAP and download netcoredbg for
    the running platform.
- Add runnables and tasks to debug from test files. Captures for nunit,
    xunit, vstest. Not strict, purely functional (does not pair keywords)
    to test framework.
- Currently unable to fully attach to runnable, but starts the vstest
    process so that it can be easily attached with PID listed in console
@Tiggilyboo Tiggilyboo force-pushed the feature/netcoredbg-and-runnables branch from a78b794 to 43052c0 Compare February 3, 2026 08:18
@cla-bot
Copy link

cla-bot bot commented Feb 3, 2026

We require contributors to sign our Contributor License Agreement, and we don't have @Tiggilyboo on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@Tiggilyboo
Copy link
Author

Have sorted the faff with git email and signed the cla... Hopefully.

@cla-bot check

@cla-bot
Copy link

cla-bot bot commented Feb 3, 2026

We require contributors to sign our Contributor License Agreement, and we don't have @Tiggilyboo on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@cla-bot
Copy link

cla-bot bot commented Feb 3, 2026

The cla-bot has been summoned, and re-checked this pull request!

@cla-bot cla-bot bot added the cla-signed label Feb 3, 2026
@Tiggilyboo Tiggilyboo marked this pull request as ready for review February 3, 2026 08:21
@reflectronic reflectronic self-assigned this Feb 4, 2026
@Dakota-LM
Copy link

Any eta on this getting merged? I'm literally just cloning zed-netcoredbg locally and importing it as a dev extension lol

@cm4ker
Copy link

cm4ker commented Feb 6, 2026

https://github.com/MattParkerDev/sharpdbg/ - I found this. Perhaps it's worth looking here as well.

@kevin-mueller
Copy link

This is super cool! The runnables.scm thing is very fancy, had no idea Zed supports that.

For those interested, I have forked my own version of this repository, integrating some of the things proposed by this PR. I also added a bunch of other stuff:

https://github.com/kevin-mueller/zed-csharp

@Tiggilyboo I also beat my head against a wall, trying to figure out how to automatically attach the debugger to a test process. In the end, I got it working, but it's a bit hacky.

I basically deferred the building of a csproj to the run_dap_locator function, because that's the only place where the $ZED variables are actually resolved. Then I could just launch the .dll via the netcoredbg config.

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.

7 participants

Comments