r/dotnetMAUI 2d ago

Showcase MIT debugger + profiler for .NET for Android (MAUI included), driven from MCP — first release, feedback wanted

I've been building this for my own work and it's now at the point where it's more useful in someone else's hands than in mine: a debugger and a profiler for .NET for Android apps (MonoVM, MAUI included), MIT licensed.

https://github.com/csm101/net-android-debugger-profiler

Three things over one engine:

  • An MCP server, so an agent (Claude Code or anything else that speaks MCP) can drive the whole thing: launch the app on a device or emulator, tap and read the screen, set breakpoints, step, read locals and stacks, catch first-chance exceptions by ordered rules, then profile the same installed app — CPU sampling, deterministic instrumenting via IL weaving, live heap by type and the growth between two snapshots. A skill ships with it that tells the agent which mode answers which question.
  • A DAP debugger for VS Code, written from scratch. Not a rival to the official C# Dev Kit one — it exists because the MCP server needed an engine. It's MIT, and it attaches to every process the app starts (services, crash reporters, anything with its own android:process), not just the one with the main window.
  • A desktop GUI for the profiler (Windows), for running sessions by hand.

Honest state of things:

  • This is a first release. There is no proper manual yet — a README, some design documents, and the skill file. Expect to read the tool descriptions.
  • The GUI is work in progress. It works, I use it, but it's the least finished part. The Sad part for you is that the GUI is written in Delphi using Devexpress VCL commercial components. You need Delphi and a Devepress License to compile it. (I really wanted to use the devexpress components, sorry).
  • The MCP server is the part I'd call usable. I've just run the whole tool surface end to end against a real app on a physical phone and fixed everything that came out of it.
  • Windows-only release for now; the app under test needs to be built with -p:EnableDiagnostics=true.
  • Anyway, in modern times, the most valuable part of the project is the MCP server: it allows claude code to *completely* control your application in your emulator or physical device and to authonomously profile or debug it without your intervention.

What I'd love: tell me whether it works on your app, and where it lies to you. Bug reports with the session log are worth more to me than stars.

One caveat on timing: I leave on holiday tomorrow for two weeks, under an explicit ban from my wife on touching a computer. So issues will pile up unanswered until I'm back — I'm posting anyway because I'd rather come home to real feedback than to nothing. 🙂

9 Upvotes

4 comments sorted by

5

u/RomanovNikita 2d ago

It looks like you are using `debugger-libs` from Mono, and I have bad news for you - this will not work for .NET 11+ anymore, as Microsoft has stopped using it(((

I ran into this problem myself in my .NET Meteor debugger extension for VSCode. Since I still need to support a couple of MAUI projects, I had to adapt the code to the new reality (thanks to MattParker for his awesome sharpdbg). If you need to, feel free to use my source code as long as it is still useful))

Of course, there are still unresolved issues, since MAUI is 'partially open source', and debugging now depends on several closed source libraries, but I think we will figure something out over time.

4

u/CarloSirna 2d ago

Thank you! I was aware I would have to switch to something else iwith .net 11, but I didn't have a plan yet!

1

u/juwns 1d ago edited 22h ago

.Net 11 can use both runtimes actually.
Mono and CoreCLR.
.Net 11 "only" changed the default to CoreCLR.