In C #, I can write:
if(Debugger.IsAttached)
Debugger.Break();
This does not work when the program is not debugging. When the debugger is connected, it behaves like a breakpoint that can never be disconnected. How can I achieve a similar effect on Android?
Or maybe I should not focus on breakpoints at all. What I really want is to make no difference with regular use (a general error message will be shown to the user), but the source of the error becomes apparent the moment the developer starts looking at it. I tried to argue, but this is a sub-project that compiled to release a taste most of the time, and I cannot rely on someone who remembers to switch it to debugging.
source
share