Setup
I have a method with attribute on it that I created. I have packed the attribute into a nuget package (debug symbol mode) like I do when I want to debug into nuget packages.
Question
How can I step into this attribute? Do I need to put some other "step into this" attribute into my attribute code? I have only found the attribute that stops my from debugging DebuggerStepThroughAttribute but nothing that will allow me to explicitly stop when in debug (witch you of course don´t need normally).
I hope I have explained this well enough.
Edit (more info)
Jordan suggested calling GetCustomAttributes in the method but that is not an option (at the least in my case). My attribute is doing a token validation on the API call so you are not allowed (401) into the method if the code in the attribute denies it access. And also I can´t put a brake point into the nuget packgage, I need to be able to step into that code.
Edit 2 (finally... code)
So finally there is code.. I did´t think I needed one but here we are :-).
I have implemented my own attribute (as you can do) where there is code I would love to be able to debug into.
public class TokenAuthenticate : ActionFilterAttribute, IAuthenticationFilter
{
public override void OnActionExecuting(HttpActionContext actionContext)
{
base.OnActionExecuting(actionContext);
}
public override void OnActionExecuted(HttpActionExecutedContext actionExecutedContext)
{
base.OnActionExecuted(actionExecutedContext);
}
public bool AllowMultiple => true;
public async Task AuthenticateAsync(HttpAuthenticationContext context, CancellationToken cancellationToken)
{
//... where I want to debug into
}
}
This attribute then just goes on the method or class like this [TokenAuthenticate ]