How to best debug deadline scripts?

It’s really annoying and time consuming to “debug” my Deadline scripts by actually running them in Deadline and waiting for the response.

Is there any way to simplify and straighten this process? What do you do, Deadline dev guys, to debug your code?

Thanks a lot in advance, cheers…

What type of scripts are you testing? If they’re plugin scripts, then you could use the RenderNow option for deadlinecommnad:

For event plugin scripts, you can change the state of a job in the Monitor to trigger the events. For example, right-clicking on a task to mark it as complete will trigger the OnJobComplete event if the job itself becomes completed.

For any other type of script, there really is no debug option. This isn’t really an issue for monitor scripts, but it’s definitely not the easiest way to test pre/post job scripts.

We have wanted to add a debugging environment to Deadline for a while now (it helps our users and it helps us). It’s just hasn’t found a place in our roadmap yet.

Cheers,

  • Ryan

+1 x infinity :slight_smile:

I would recommend Eclipse with pyDev + extra configuration gives a pretty sweet IDE with a reasonable intellisense kind of feel about it. SVN/GIT also works pretty well :wink:
If you need a debugger, particularly in Maya, then WingIDE is the best option.

Ideally I’d love to be able to write my scripts (any) for Deadline in a “virtual” environment where I could test and try if my scripts will work on the actual render farm.

But I realize that’d be extremely difficult to achieve. Still, currently, I write a script for, say, the 3ds Max plugin. The PreLoad.py script. I have to put it on my server and submit a test scene file to see if the script contains any errors. I also have to put in a TON of Deadline specific functions (like the LogInfo or LogWarning) that are simply not available in my IDE when I actually work on the script so I cannot access their properties or required parameters (intellisense) etc…

It’d be helpful if we could (and I don’t know whether it’s already possible) somehow link the Deadline libs in the VS2010 for example so that we get intellisense etc…

Then agian, testing the scripts is a pain as I have to submit a job…

It’s just very, very time consuming doing it this way.

I’ve been able to speed the process a bit by installing Deadline in a sandboxed virtual environment and testing it that way, but it’s still far from intuitive and “agile”.

would adding pydev to the lib directory of deadline and doing some remote debugging works ?

Hi
The rendernow option sounds really promising. I might be doing something completely wrong but when i do the following:

deadlinecommand -rendernow "/Users/bonsak/Dropbox/Deadline/RenderNow-Script-testing/c4d-scene.c4d" "/Users/bonsak/Dropbox/Deadline/RenderNow-Script-testing/Job-Info-File.job" "/Users/bonsak/Dropbox/Deadline/RenderNow-Script-testing/c4d_plugin_info.job"

With these files:
“Job-Info-File.job”

<?xml version="1.0" encoding="us-ascii"?>
<Job xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <PluginName>Cinema4D</PluginName>
  <FramesList>0-20</FramesList>
</Job>

and:
“c4d_plugin_info.job”

SceneFile=/Users/bonsak/Dropbox/Deadline/RenderNow-Script-testing/c4d-scene.c4d
Version=14
Build=None
Threads=0
Width=960
Height=540
LocalRendering=False
FilePath=/Users/bonsak/Dropbox/Deadline/RenderNow-Script-testing/frames
FilePrefix=frames

i get this error:

/Users/bonsak/Deadline/slave/this/jobsData' not found. (System.IO.DirectoryNotFoundException)

Do i need to put these files in the repository for this to work?

Cheers
Bonsak

This unfortunately looks like a bug. We’ve logged it, and we’ll look into it for Deadline 6.

Cheers,

  • Ryan

Ok.
This was done with v 5.2.0.49424 by the way

Cheers
Bonsak