Share via

runs only in 'debug' mode

Eduard Kaufmann 401 Reputation points
2025-02-27T07:43:14.2266667+00:00

I found lots of issues (google browsing) re 'running only in debug mode'!
However, I cannot figure out what to do in my case.

myapp https://github.com/edikaufmann/RandoJson

PS: I obviously cannot debug without debugging!?!

Your help is appreciated, ed

Developer technologies | .NET | .NET Multi-platform App UI

Answer accepted by question author

Bruce (SqlWork.com) 84,071 Reputation points
2025-02-27T19:09:40.7566667+00:00

the debug build uses the maui interpreter, while release build uses compile to native AOT and trimming. native AOT is more restricted than the interpreter and trimming can cause required code to be removed. You can disable these features at a performance cost (memory size and speed).

it is important to have internal diagnostics and logging to help "debug" release code.

note: in a normal .net app the difference between debug and release is compiler optimizations performed, rather than a completely different compiler.

Was this answer helpful?

1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.