This works in C11, havent tried in any other earlier versions of the C7+ 32bit ide, but adding this to template code makes it possible to send messages to debugview without much effort so its another way to debug templates instead of using the built in template debug facility .txt file.
Do not use Win32
#Group(%SendDebugViewMessage,%Localdbgvwmsg)
#RunDll(‘Kernel32.dll’,‘OutputDebugStringA’,%Localdbgvwmsg),Release,Win32
It sends this output.
[4488] m\<[À[l[[xm\h[H
[4488] [Pm\Lm\Dm\<m\,m\ä [P [t©b
Do use Pascal
#Group(%SendDebugViewMessage,%Localdbgvwmsg)
#RunDll(‘Kernel32.dll’,‘OutputDebugStringA’,%Localdbgvwmsg),Release,Pascal
which sends
[4488] Test Message for Debugview
[4488] Test Message for Debugview
So you can add a button or other template code to call debugview.
#Button(‘Test Debugview’),WhenAccepted(%SendDebugViewMessage(‘Test Message for Debugview’))
#EndButton
#Call(%SendDebugViewMessage(‘Test Message for Debugview’) )
I dont think an example for debugging templates specifically exists, but it just got a bit easier, and I dont think Brahns addon does Template debugging
How to have DebugView++ Embedded in the IDE - marketplace - ClarionHub
A quick and dirty way to attach “DebugView++.exe” to a window handle - code / Interop - ClarionHub
Now to save on typing, you could shrink the group name & parameter down to something like
#Group(%D,%M)
and use
#Call(%D(‘Some message’))
#Call(%D(%Control))
#Call(%D(%Procedure))
etc etc
FWIW.