How can I view W matrix evaluation times and the W matrices themselves?

I’m trying to solve a stubbornly unstable nonlinear ODE. When I plot the terms of my ODE its fairly obvious what time step things start to go wrong at.

As seen in this graph, everything starts to fall apart at z = 35.98623151025863, time step 14417.

I’m trying to figure out why, so I want to view the W matrix before this time step and immediately after. Ideally, I’d like to understand how the W matrix is computed, and perhaps pass an analytical W matrix to the system. Any advice on how to do this?

Edit: this thread ODE solver stats - #2 by ChrisRackauckas defines W = I – gamma*J but it doesn’t say anything about figuring out when W matrices are computed, viewing their values, or how I can pass in my own

I solved my problem. Having the ability to view the W matrix and when it gets solved still seems like a useful function. I was able to get the data I needed using a nonlinear solver with the options set to evaluate the Jacobian at every iteration, and that helped me find the issue.