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
    • Recent
    • Tags
    • Users
    • Login

    Noob question about Debugging

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 310 Views
    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 Offline
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 16/02/2011 at 15:38, xxxxxxxx wrote:

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

      ---------
      Prepare to be noobed.🙂

      When I try to use an API method that I've never used before. I rely on Visual Studio's intellisense to tell me if I've got the syntax right.
      But the problem is. Very often V.S. says I've got it written correctly. But the code doesn't actually work because I'm constructing the syntax the wrong way.
      In addition to this. The C4D console that I also use with Coffee. Almost never spits out any errors to help me figure out what I did wrong either.

      It's very rare when the console doesn't give me an error if I make a mistake with Coffee. Which is very helpful in tracking down where I made a mistake.
      But with C++. The console seems to be on vacation most of the time. Producing no errors, even when the code doesn't work.
      So I was wondering if there was some other way I'm supposed to use with C++ to check for errors?

      -ScottA

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 17/02/2011 at 01:50, xxxxxxxx wrote:

        If you want stuff printed to the console (such a variable value) you need to do it yourself - use GePrint() to do that. If it really is a syntax error that should be picked up by the compiler and you'll get compiler errors. That's the C++ equivalent of the COFFEE interpreter printing errors to the console.

        The best way of debugging is to step through the code line by line until you hit the problem. You do this by getting the project properties and in the 'Command' parameter, enter the path to the C4D executable.

        Now, when you hit F5 in VS, VS will use C4D as a debugger, allowing you to set breakpoints and step through the code. Works really well.

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 17/02/2011 at 08:42, xxxxxxxx wrote:

          OK thanks.

          I just wanted to be sure that there wasn't something else besides those things you mentioned. That I didn't know about.

          -ScottA

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