Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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

    Visual Studio - Debugging Plugin Error

    Cinema 4D SDK
    3
    9
    1.2k
    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.
    • mfersaouiM
      mfersaoui
      last edited by

      Hello,

      When I press the "Local Windows Debugger" to start debugging I get the following error message:

      debugging_error.jpg
      What do this error message mean?
      Thanks.

      1 Reply Last reply Reply Quote 0
      • CairynC
        Cairyn
        last edited by

        You're apparently trying to start the plugin as program. As a plugin is a DLL, it cannot be started on its own. You need to set Cinema4D as the debugging host program.

        462366dc-a216-4ef4-95af-cd1aa380a004-image.png

        mfersaouiM 1 Reply Last reply Reply Quote 0
        • mfersaouiM
          mfersaoui @Cairyn
          last edited by

          @Cairyn
          Hi,

          I had already set Cinema4D as the debugging host program.

          I don't understand what mean the Command Arguments that you used in your screenshot, is it the path to the preferences folder? I tried this: g_prefspath="C:\Users\ComputerName\AppData\Roaming\MAXON\Cinema 4D R19_BFE04C39"
          but I get the same error message.

          debugging_options.jpg
          general_options.jpg

          1 Reply Last reply Reply Quote 0
          • CairynC
            Cairyn
            last edited by

            Hmm, on second glance, the error message doesn't even seem to complain about your own plugin... it tries to start a .lib (statically linked library) from the obj directory, which has a cinema.framework name to boot.

            Which it shouldn't do, given the fact that you set Cinema4D as start application. At the time when you start the debugger, this .lib should be linked to your cdl64 output already.

            What do your settings say under Linker/Debugging? The tabs you show here seem perfectly fine to me...

            (Yes, the g_prefspath is my home directory; if you're not using a custom environment, you don't need that parameter.)

            mfersaouiM 1 Reply Last reply Reply Quote 0
            • mfersaouiM
              mfersaoui @Cairyn
              last edited by mfersaoui

              @Cairyn said in Visual Studio - Debugging Plugin Error:

              Linker/Debugging

              Here is screenshot of the Linker/Debugging panel:

              linker_debugging_options.jpg

              1 Reply Last reply Reply Quote 0
              • CairynC
                Cairyn
                last edited by

                Looks just like mine, so no errors there.

                Okay, last try for today: Is your plugin project in the project explorer displayed as bold text? If not, try context menu -> Set as start project (or however the menu point is called in English)

                If that doesn't work either, I need to leave the issue to the specialists 😉

                mfersaouiM 1 Reply Last reply Reply Quote 1
                • mfersaouiM
                  mfersaoui @Cairyn
                  last edited by mfersaoui

                  @Cairyn Thank you so much, this has solved the problem.

                  1 Reply Last reply Reply Quote 0
                  • CairynC
                    Cairyn
                    last edited by

                    ah, great. I should try the last solution first, next time 😉

                    1 Reply Last reply Reply Quote 0
                    • S
                      s_bach
                      last edited by

                      Hello,

                      you find information how to run a plugin from within Visual Studio in the documentation: Development for Microsoft Windows - Running Plugins.

                      best wishes,
                      Sebastian

                      MAXON SDK Specialist

                      Development Blog, MAXON Registered Developer

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