I have a dead simple one-liner method that I don't want to see in the stack trace: is that possible? maybe mark it with an attribute?
Just to clarify, I'm not trying to print the trace, or rethrow, or have auto step-through in the debugger. I'd like the method to not show up in the trace in the first place, because the trace is then handled by some third-party code. I want control at runtime, I'm not interested about debugging. I'm saying this because most of what I've read on StackTrace seem to be about these topics.
This can only be done when your method is inlined. Either the JIT does it, or you do it yourself (change the code). The JIT however, is pretty conservative about inlining methods and practically only does that when the method is very small, or when the method is used in a loop.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With