R16 DebugOutput [SOLVED]



  • On 06/02/2015 at 12:29, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   R16 
    Platform:   Windows  ;   
    Language(s) :     C++  ;

    ---------
    Hello Forum,

    Where should I be able to see DebugOutput() output in Visual Studio 2012 when working on R16 projects?

    Here is my code in main.cpp:

    Bool PluginStart( void )
    {
        DebugOutput( maxon::OUTPUT_DIAGNOSTIC,  "DebugOutput() in PluginStart()" );
        return true;
    }
    

    Currently, DebugOutput() is not showing up in "Immediate Window" or "Output."  I have "g_alloc=debug" as a Debugging Command Argument and I CAN see Memory Leak Detection in the "Immediate Window."

    The settings for the VS "Output" window has every option checked.

    Also, I have tried "g_console=true" as a Debugging Command Argument, but the console does not not appear.

    In R15 projects, the console window opens and I CAN see DebugOutput in it.  DebugOutput also appears in the "Immediate Window."

    Thanks for your help,

    Joe Buck



  • On 09/02/2015 at 11:25, xxxxxxxx wrote:

    Hi Joe,
    are you doing a debug build?
    I just tested and here with R16 in VS2012 and I can see it in the Output panel of VS.
    In our PluginCafe blog we have an article about Debugging Cinema 4D Plugins. In there is a table showing the different options for debug prints.



  • On 09/02/2015 at 12:10, xxxxxxxx wrote:

    Hi Andreas,

    It was that excellent article that made me try DebutOutput.  I believe I'm doing a debug build.

    Solution Configuration: Debug
    Solution Platform: x64
    Properties->Configuration Properties->Debugging->Command Arguments->g_alloc=debug g_console=true

    Is this the setup for debugging?  Or am I missing something?

    debug.png

    Are you sure you have a stock setup of Cinema 4D and Visual Studio?  The last time I went through troubleshooting debugging and Xcode, it appeared that you guys might be using something different?

    https://plugincafe.maxon.net/topic/8139/10601_r16-memory-leaks-solved&KW=R16+memory+leaks&PID=41955

    Thank you,

    Joe Buck



  • On 10/02/2015 at 01:51, xxxxxxxx wrote:

    Hi Joe,

    actually "we guys" most of the time are using the actual Cinema4D solution instead of the cinema4dsdk solution. Partly because we can 😉 and (being more serious) because it provides us with the needed insights to answer (most of) your questions. Normally this should make no difference.
    In this case, you are right, it makes a difference. I tried once more with the cinema4dsdk solution and get the same result as you. 😢
    Sorry, for not doing this test right away.
    I stepped through the print in both solutions and I see the difference, but I have no idea, what's happening there. Please give me some time to investigate. Sorry, no quick solution. For now, I suggest, you fall back to some of the other print methods.



  • On 10/02/2015 at 04:08, xxxxxxxx wrote:

    Hi Joe,

    this is getting a bit awkward for me. I need to correct my debugging article...
    Please try to add "-debug" in addition to "g_alloc=debug" to the command line parameters. I think, it's going to work then.



  • On 10/02/2015 at 10:34, xxxxxxxx wrote:

    @Mr Block

    Partly because we can Wink

    HA!!!!

    Mark it solved!

    Also works in Xcode.

    Errors included, I still think your article is very helpful to a rookie like me.  It's way better than anything else I've found online for beginners.

    Thanks for your patience and support.

    Joe Buck


Log in to reply