Reading the interpreter/debugger output

Is there a mechanism to inspect the output? I’ve written a very small unit testing framework, and it’s super convenient to write tests directly in Dialog. I can write some scripts to assert on output from dgdebug -q, if I have to, but it’d be nice to do as much as possible in Dialog itself.

Oh, hang on. That’s what (collect words) does, isn’t it? Nifty!