AWS Thinkbox Discussion Forums

How to set up a local development environment with remote debugging

I’m developing a custom Deadline event plugin (OnJobFinished) and attempting to set up remote debugging using pydevd_pycharm . I have a local dev git repo where I have set the DEADLINE_CUSTOM_PATH environment variable to, and this is pickng up as expected.
I’m also just using my own dev machine as the deadlineworker ; with DEADLINE_CUSTOM_PATH set to the same local dev path.
However, when I run the debugger and add breakpoints (or even suspend) to the code, I see the OnJobFinished event plugin run in the Deadline Job Reports (from my dev machine), but it does not hit these breakpoints or pause the application as expected, so I can read the threads and variables at this point.
I added the following logging code to my event plugin for troubleshooting:

def OnJobFinished(self, job):
    script_path = Path(__file__).resolve()
    self.LogInfo(f"Script is running from: {script_path}")
    self.LogInfo(f"sys.argv[0] is: {sys.argv[0]}")
    self.LogInfo(f"Current working directory: {os.getcwd()}")

This logs:

INFO: Script is running from: /opt/Thinkbox/Deadline10/bin/none INFO: sys.argv[0] is: INFO: Current working directory: /opt/Thinkbox/Deadline10/bin

The path /opt/Thinkbox/Deadline10/bin/none and an empty sys.argv[0] are unexpected. I believe Deadline might be loading the plugin dynamically or from memory, making it difficult to attach a debugger.
Can you provide guidance on:

  1. How to properly set up a local development environment with remote debugging (e.g., pydevd_pycharm) for custom event plugins?
  2. How to configure DEADLINE_CUSTOM_PATH to ensure the plugin runs correctly in a debuggable context?
1 Like

I’d like to know the answer, too.
I know that the Event plugins run in a separate sandbox process, which might have something to do with it. Since the subprocesses are managed, not sure they can be suspended at all.

Privacy | Site terms | Cookie preferences