Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    R16 DebugOutput [SOLVED]

    SDK Help
    0
    6
    552
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        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[URL-REMOVED]. In there is a table showing the different options for debug prints.


        [URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          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://developers.maxon.net/forum/topic/8139/10601_r16-memory-leaks-solved&KW=R16+memory+leaks&PID=41955

          Thank you,

          Joe Buck

          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

            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.

            1 Reply Last reply Reply Quote 0
            • H
              Helper
              last edited by

              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.

              1 Reply Last reply Reply Quote 0
              • H
                Helper
                last edited by

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

                @Mr Block

                Partly because we can !Wink[URL-REMOVED]

                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


                [URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post