Unsolved Debugging Cinema 4D in code editor

Hey there. I started working on some project which uses custom Cinema 4D plugin written in Python and I'm new in this. There is many lines of code in that plugin, I'm trying to get some debugging functionality in Visual Studio Code (or PyCharm), so on some actions on that plugin in Cinema 4D (like button click etc.), I want to debug it in code editor. I was looking for the answer, found some configuration in python plugin in debugging mode topic, also tried with ChatGPT, but unsuccessfully.

Let's assume I have project my-project in C:\Users\Stefan\AppData\Roaming\Maxon\Maxon Cinema 4D R25_63FF7547\plugins folder.
In that project there is src folder, and in that folder there is my-plugin.pyp and res folder with all necessary files.

Also, I have c4dpy.exe in D:\Program Files\Maxon Cinema 4D R25 folder.

Can someone explain me instructions step by step how to get debugging to work in VSC or PyCharm (from which directory in command line I should run install commands), where configuration should be located etc.)?


Hi @StefanGMBG debugging python plugin is not possible in Cinema 4D R25 since debugpy previously known as ptvsd hardcoded the type of the files so you can debug only .py file.

However since S26 we released a Visual Studio Code Extension that work with a Cinema 4D Plugin. And this extension once correctly configured as shown in Cinema 4D Connector - Documentation let you loads, runs, and debugs Cinema 4D scripts and plugins from VS Code.