5E Product Walkthrough Playlist

Thread: Debug examples

  1. #1

    Join Date
    Mar 2009
    Lidingö, Sweden, Europe

    Debug examples

    Hi all,

    I don't get the debug function to work. I've tried Debug.chat(variable) and Debug.console(variable) but I get no output. I've also tried printstack() but with the same result - no output. The print function does produce output but only in the top level of a function. Even though I now that a certain deeper level code will get executed the print statement doesn't produce any output. I can see the changes the code produces in the character sheet, but in the current case gets no printout of the calculations, it's quite frustrating. Anyhow, if anyone has any working examples of how to use the debug functions that they like to share, that would be appreciated.


  2. #2
    I use these every day in my work.


    The first one outputs the variables separated by pipe symbols to the chat window (if defined), otherwise to the console.
    The second one outputs the variables separated by pipe symbols to the console.
    The third one outputs the current Lua call stack.

    To access the console, type /console while FG is running. If the debug statements run before the console is open, they may not appear.
    All console messages are output to the console.log file located in the FG data folder.


  3. #3
    damned's Avatar
    Join Date
    Mar 2011
    Blog Entries
    I use soooo many Debug statements when Im coding stuff.
    My best guess is that its either not running the code the way you think it is or its running from another copy of the ruleset (unpacked vs packed) etc?
    Debug.chat("onLanded", rRoll, rSource);

    MoreCore - Generic Ruleset
    --- Projects ---
    Extensions | Tutorials | MoreCore | MoreCore Themes | Call of Cthulhu | Maelstrom | FG Con

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Log in

Log in