Storing debug values in a variable for later use

when running some tests with “langchain.debug = True”

is there any way to store the intermediate results of the chain “reasoning” in a variable for later use? for example the “prompt_tokens”

thanks!