Results 1 to 5 of 5

Thread: Watching a script run

  1. #1
    Senior Member Pazleysox's Avatar
    Join Date
    Feb 2009
    Posts
    463

    Default Watching a script run

    Is there a setting so I can watch what a script does? I have a script that's getting hung up, and I don't know on what line. I wanted to know if I can see the code as the script is being run?
    Scripts I have written:
    Unlock Dread A Script to save you a bunch of clicks.
    Standard Rollover Bonus A Script that shows best items to pull/equip for bonus turns.
    Standard PVP Bonus A Script that shows the best items to pull/equip for bonus PVP Fights.
    Rollover Management A Script that does all the daily deeds you might have forgotten, or might have missed.
    Chatbot A Chatbot script. Simple start for those who want/need one for their clan.
    Zap Wand A Dungeon of Doom ZAP WAND getting script.

  2. #2
    Developer
    Join Date
    Apr 2010
    Posts
    5,090

    Default

    When I am doing something like that I add code to the script that prints out what it is doing, and maybe variable values, to help debugging.

  3. #3
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    4,314

    Default

    If the script author used zlib for print statements, adjusting the verbosity may generate output that gives you warm fuzzy feelings. Lots of examples for you to find if you are the author :-)

    Like Darzil, I deal with debugging by adding print statements. Where to put them is an art and the better you know your code the faster you will find out where useful statements go. I often print something at the start and end of loops, for each iteration in a loop and prehaps a variable or two before a decision point (if statement).

    If you have enabled stack traces on abort and you mash the stop now button and the stars align you should be told where the script was when it stopped. That may or may not be related to what it was actually doing when you mashed the button but sometimes it will point you in the right direction.

  4. #4
    Senior Member Pazleysox's Avatar
    Join Date
    Feb 2009
    Posts
    463

    Default

    Adding print to my script is what I've done in the past. I'm Workin on a partial script from someone else, trying to bend it to my will.

  5. #5
    Senior Member
    Join Date
    Apr 2009
    Posts
    1,832

    Default

    Technically, you can enable "debug ash", but that's not exactly the right level of detail for most of us, and not exactly the kind of information most of us expect.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •