Hi Johan, there are a few ways you can do it.
1) declare the API yourself.
2) Use a 3rd Party tool you might already have installed to do it. I think Bruce adds the ability to Trace in some of the capesoft products.
3) Use a the debuger class, inc like the one that Mark Goldberg has created as part of his public clarion repository. Place them in the accessory\libsrc\win dir.
Add this into each application global include
INCLUDE('debuger.inc),once
dbg Debuger
and then add this on startup
dbg.mg_init('MyProgramName')
The code is fairly self documenting and gives you lots of flexability.
4) Use the template and classes that John Hickey has created in the ultimate toolbox
The latter has it’s own debug view application called Ultimate Debug Overview, it is very clarion centric and John has designed the output to work best with this rather than debugview++ etc.