SciML / FunctionWrappersWrappers.jl

MIT License
10 stars 2 forks source link

How to step through a wrapped generated function? #18

Open wangyunyueyueniao opened 3 weeks ago

wangyunyueyueniao commented 3 weeks ago

When an ODEProblem is solved, it seems that a wrapped generated function is called during the initialize process. So my question is: how to step through the wrapped generated function so that it can be debugged. Is there any best practices? How to export the source code of the wrapped function from the pointer?

chriselrod commented 3 weeks ago

If you have a FunctionWrappersWrapper object, you cannot. That information has been lost.

You can try either

  1. Force full specialization, that way it doesn't use a FunctionWrappersWrapper. See here for more information.
  2. Keep the f you passed around. Save the arguments that are passed to the FunctionWrappersWrapper, exit the debugger, and then step into your f manually.