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
    • Register
    • Login

    VS Code -> Cinema 4D Connector -> Agent

    Scheduled Pinned Locked Moved General Talk
    programming
    2 Posts 2 Posters 26 Views 2 Watching
    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.
    • M Offline
      mogh
      last edited by

      Dear Developers,

      is it possible to provide Agents access to the Connector Debug output inside VScode ?
      running at ws://ip:port

      inside means not special tools or ports ... I have limited access to the machine.
      thank you

      ferdinandF 1 Reply Last reply Reply Quote 0
      • ferdinandF Offline
        ferdinand @mogh
        last edited by ferdinand

        Hello @mogh,

        your question is a bit ambiguous. What is 'Connector Debug output' for you and what is exactly 'inside VSCode' for you, especially under the condition of 'limited access to the machine'?

        The connection between VSCode and Cinema 4D to exchange scripts and console output of Cinema 4D is proprietary. It is an websocket connection that runs on the port you define in Cinema (by default 7788), e.g., 127.0.0.1:7788. The payload is JSON but I would rather not publicly document its details, primarily because I do not want to give the impression that there is any guarantee that the protocol is meant to be a stable API third parties can hook into. But since this is a VSCode extension, you can of course just look at the source to understand the details, or ask an agent to do it for you.

        When you mean with debug output the actual debugger, then we are using the Microsoft library debugpy. We use port 5678 but you could also use any other port because your app is the server, not the consumer. I.e., the debug IP could be 127.0.0.1:5678. The old (2026.3) docs contained a section that showed how to manually attach from your code to a debugpy client, e.g. VS Code. But I have removed this section in the 2027 Debugging Manual because the debugger is currently not properly working under MacOS and I did not find the time to fix that for 202.0.0 (but I will fix it within 2027.X.X).

        Note that the debugger connection is made from your code; your code is the server, VSCode is the client. debugpy is a proprietary Microsoft library and the only meaningful enterprise debugger for Python at the moment. There is the builtin pdb library which you can use but it IMHO has its limits. There are also some smaller third party alternatives, but they are all inconsequential and I do not know if they work with Cinema 4D. debugpy is using the open DAP protocol, so it is not impossible to create your own consumer, but it is probably also not trivial (I am mentioning this because your message somewhat implies that you want to sidestep the VS Code debugger interface).

        Cheers,
        Ferdinand

        MAXON SDK Specialist
        developers.maxon.net

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