Debugging on MacOS...
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/02/2005 at 00:14, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 8.2
Platform: Mac ; Mac OSX ;
Language(s) : C++ ;---------
Well, sort of.In Windows, I debug my plugin using GePrint(). It is very accurate at telling me where in the plugin things went awry - very accurate: I can isolate a single line. And, to boot, Windows doesn't make C4D disappear in a "Poof!". I can look over my print statements and then dismiss at will.
On the other hand, MacOS seems to have two problems. The first is that, yes, "Poof!", C4D is gone thus I have to keep a vigilant eye upon the Console Window. But that wouldn't be such a problem if it weren't for the second problem. Unlike Windows' (eh hem) rock-solid accuracy, my GePrint()s under MacOS don't seem to have any rhyme or reason relating to the cause. Maybe this is because the OS is too busy poofing the application out of existence? I don't know, but I can't use GePrint() statements to localize my trouble spots. It makes for arduous, tedious, and time-consuming debugging. And to boot, the compiled code produced by CodeWarrior/MacOS is, let's say, touchy. Code that works flawlessly under Windows requires days to translate into CodeWarrior/MacOS code that works.
Is there a better method for MacOS? I can't stand implementing working Windows code into MacOS code that crashes C4D with no way to determine the cause.
Thanks
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/02/2005 at 13:19, xxxxxxxx wrote:
Have you tried using breakpoints? If you really want to use debug-by-println, then perhaps you could write to a file instead under OSX? That wouldn't go away so easily...
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/02/2005 at 13:31, xxxxxxxx wrote:
Could I go into a tirade about debugging. Too many times (and, IIRC, mentioned here in this forum), the code created for debugging doesn't exactly work the same as non-debugged code. I've experienced this (nondebug=crash, debug=runs perfectly) and that's when I started using the debugger in my brain because the release code is that which is being distributed, not the debug code. Maybe CW9 does not have this problem, but VC++6 definitely sucks in this regard.
That said, I think that I tried writing to file, but nothing was written because of the crash (write buffer was probably never written and the file not closed properly). Always ended up with empty log files. The alternative, I guess, is to open/write/close for each 'print'.