Fastest and easiest way to test / interact with deluge scripting?

Fastest and easiest way to test / interact with deluge scripting?

I have a background in ruby / JS so the actual programming logic of deluge is obviously no trouble but the main struggle is trying to actually see what information I have available where and how things are working and I haven't found any great test environments or debug methods like dropping a debug in JS that lets you see all your variables and such. I find myself resorting to things like emailing myself mid script to see what is going on at places and I'm just wondering if there is a better way.