Debugging in VS Code does not pause at breakpoints
-
Dear community,
I'm trying to setup VS Code as outlined in the Documentation here.I have the Cinema 4D Connector extension installed, and the script is successfully executed when i click on Debug in Cinema 4D, but it seems like my breakpoints are disregarded.
I then added the launch.json with the code from the Documentation link above to my workspace, but the behavior is the same.
Please see the video for clarification:
Reproduction
To recreate please follow these steps:
- In Cinema 4D:
- Open the Script Manager.
- Save a simple script (see below for the exact script I used)
- Start Code Exchanger
- Open the scripts folder in VS Code:
- Connect Cinema 4D Connector to the running C4D instance
- Back in Cinema 4D:
- Click Send to IDE in the Script Manager
- Back in VS Code:
- In the now open script, set two breakpoints (line 9 and 10)
- Click Debug in Cinema 4D
EXPECTED: I would like the script to break first in line 9 and then in line 10 to be able to inspect the values of greeting and target in the Run and Debug panel.
ACTUAL: The script runs completely and I don't see any information on the state of the mentioned variables. I get a notification saying:We noticed you are attaching to ptvsd (Python debugger), which was deprecated on May 1st, 2020. Use debugpy instead.
- Still in VS Code:
- Disconnect the debugger.
- Go to the Run and Debug panel
- Create a launch.json file
- Replace the contents of the launch.json file with the code from the Documentation and save the file.
- Go back to the saved script and try running Debug in Cinema 4D again.
RESULT: Same as after step 4.
System
I'm on macOS Tahoe (Version 26.2)
Cinema 4D 2026.1.2 (Build 2026_1_2_e960bfd939c3_2264416005) OSX
Visual Studio Code Version: 1.108.2 (Universal)
Cinema 4D Connector Version 1.2.2Test Code
import c4d doc: c4d.documents.BaseDocument # The currently active document. op: c4d.BaseObject | None # The primary selected object in `doc`. Can be `None`. def main() -> None: """Called by Cinema 4D when the script is being executed. """ greeting = 'Hello' target = 'Cinema4D' print(f'{greeting}, {target}!') if __name__ == '__main__': main()I'm really sorry if i overlooked anything obvious, or am missing the point altogether. Either way, any help/pointers in the right direction would be greatly appreciated.
Thank you all very much in advance for your time and consideration.
Best,
Julius - In Cinema 4D: