Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Java Worker Javascript Debugging Tips?

1457319400
Magik
Sheet Author
Does anyone have any tips for debugging java workers? Is there a way to step through the code? I poked around a bit in the Chrome developer tools Sources and other selections, but couldn't find much. If there isn't a way to step through it, does everyone (generally speaking) just put in console.log() commands to get info during runtime? Thanks!
1457323283
vÍnce
Pro
Sheet Author
Here's a couple threads I used to help me to workout js issues.  ;-) [SheetWorkers] Debugging advice: How to debug these things? [SheetWorkers] Debugging Advice - Part Two.
1457324507

Edited 1457325038
The Aaron
Pro
API Scripter
If you're savvy to debuggers and you're in Chrome, putting the keyword "debugger" in your code is the easiest way: on('change:foo',function(){ debugger; // some code }); If you have the debugger open it will stop on that statement as if you'd set a breakpoint there. You can then go off and set other break points.  Also, checkout the  debugging functions in TheAaronSheet . They give you colored log messages to make tracking things down easier.