Don't know how to use CnDebug
At first, thanks a lot for the great stuff!
My problem is that I didn't manage how to make CnDebugger work.
As I understood from the manual, it's enough just to add CnDebug.pas to my uses list
and to use CnDebugger global object's functions.
But when I run CnDebug Viewer nothing is displayed...
Should some $DEFINE's be set or whatever else?
Thanks in advance!
If you use debug viewer in vista, you should run debug viewer as administrator. (even you did that, debug viewer sometimes still not work properly in vista)
To enable debug viewer to debug your application, you should build your application with the conditional: DEBUG or ALLDEBUG. You can set it in project options -> Directories/Conditionals. Once you set the conditional, you should build (not compile) your application to make the conditional work.
Thanks a lot! The conditional was the missing component. All is working!
But an extra question: could the log (trace) info be automatically saved into the file by default
(without using the CnDebugViewer)? I want to make some kind of usage statistics in my application.
Thanks in advance.
you have the cndebug.pas ,
i think redirect the message to file is not so hard,
but of course, it is good to have the option to just log the messge and don't show the viewer.
CnDebugger's protected method "InternalOutputMsg" is used to put all fields to Channel. If interesting, you can modify it and redirect to a file.
It will be so nice if you can implement it and we canl add your enhancement to our CnDebug.pas.:)
:) well, thanx for the hint, I've implemented the simple output into a file...
But can I somehow transform it into XML that could be later opened by the Load command in Viewer?
Is there any specification (DTD, XML Schema, ...) or maybe src file of this transformation?
If this can be done, I'd like to submit an enchancement to you; but if no, there is a 10 lines of code
that should be added for simply output to a file... I'm not sure if it's worth to do :)
[[i] Last edited by seekbirdy at 2007-9-24 15:16 [/i]]
XML writing need XML lib. it's not included in CnDebug.pas. We want to make CnDebug.pas clean, So I think the format of output may only be text.
CnDebugViewer uses OmniXML lib to write messages to XML format. Maybe we can add a "load from txt" function in CnDebugViewer.
Ok, anyway thanks a lot!
Sending a pretty silly enhancement with output to a file.
Here is it (in attachment).
Just set FileName property of CnDebugger to the desired filename.
Text is not formatted in the output file, so waiting for a feature in a CnDebugViewer! :)
[[i] Last edited by seekbirdy at 2007-9-24 21:33 [/i]]
OK.?Thanks for your contribution.?You'll in our credits.
I've merge your modification to our CVS and add a property DumpToFile: Boolean to control this behaviour. File extension use "*.cdd". it means CnDebug Dump. :)
A condition DUMP_TO_FILE can?also be used to enable it.
And CnDebugViewer now can read cdd file and display it.
If interesting ,you can use CVS to obtain the latest code and compile a CnDebugViewer to verify it for us.
Or, wait for a new nightly build version of CnWizards tommorow or a few days later.
Thank you so much for the feature!
Sorry but I can't download the sources from CSV today due to traffic limitation...
Maybe I could do it in a few days... or just download a nightly build mentioned by you :)
Dunno what will come earlier.
Powered by Discuz! Archiver 5.0.0
© 2001-2006 Comsenz Inc.
0.8.2.333 unstable comes out. You can download it from: