2010/7/20 Mattias Gaertner <[email protected]>: >> So please enlighten me. What are the benefits of such a debug monitor? >> Perhaps I am missing something.
Sometimes you simply don't have a stdout to write to. I just have one such occasion where I'm working on a plugin dll for another application on windows and I didn't find a way to write to stdout an the other half of the plugin which is written in the application's built in scripting language uses OutputDebugString() for all debugging output. On windows this is simply the most comfortable way to quickly spew out some debug messages from any kind of application and have them all nicely arrive in one central easily accessible place and displayed and filtered in realtime. Many windows programmers use this API because it is so much easier than having to experience the pain of using the windows command prompt to navigate through folders or installing all the cygwin tools to do even the most basic command line stuff like tail -f | grep and friends. It is true that with a standalone Lazarus application on windows and how things currently are the best (and only) available option is writeln to stdout or a log file, simply because the windows debug output API is sabotaged by GDB's way of not recognizing these messages and treating them as what they really are. Most often (and also all other languages I use) I find myself simply completely not using a debugger at all and doing all my debugging by outputting simple messages to trace the program flow and some variables I am interested in. And on Windows I like to output them to where it is most easy to watch them and filter them, and this is certainly *not* stdout. And this is exactly what I'm currently doing in Lazarus: I have disabled the debugger because it will disturb my debugging. It would just be nice to have this all somehow unified and more *comfortably* usable in Lazarus. On windows I almost exclusively use OutputDebugString() for everything that is (or runs inside) a GUI app and has no stdout available (basically everything in windows). Only the Lazarus/GDB combination will not easily allow this and this is because GDB originates from the *ix world and there no such API exists and working from the command line and with log files is a hundred times easier with all the available tools and much more the norm than in windows. After All Lazarus is a graphical IDE and it should not force me to mess around with the clumsy windows command line and/or 3rd pary tools to tail and grep log files. comfortable outputting to a debug monitor in a GUI environment where there simply is no easily accessible stdout and no easy way to tail -f some file should be the norm in a GUI based development+debugging environment. The first step and immediate help would be to filter all &"Warning: " messages from GDB output and display them separately. and in parallel maybe try to convince the GDB people for some future release of GDB to recognize these messages correctly as what they really are, label them separately and not throw them as ordinary warnings to stdout. -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
