Web based debug log


#1

Ever get tired of the sheer volume of the debug output in the log files or need to work on an entity server script but can’t subscribe to the server script logs? Maybe, you want your logs all sorts of awesome colors? Well then, this is the tool for you. It allows you to pipe most errors and all debug messages to a website.

How to use: go to https://debug.midnightrift.com/ and get the channel string that is generated then add that string into your entity.

    var debug = Script.require('https://debug.midnightrift.com/files/hifi/debug.min.js');
    debug.connect('1d7813de1dd1e1ddafaaa9ea476eec53');

You can send any number of messages, the first argument can be an object with the color property to set the color of the text string on the web page.

debug.send({color:'red'},'message1','message2');

Entity Script Example:

(function () {
    var debug = Script.require('https://debug.midnightrift.com/files/hifi/debug.min.js');
    
    //Don't forget to insert your actual channel from the website here.
    debug.connect('6ee142c020d65286b1f7a4761b7547bc');
    
    this.clickDownOnEntity = function () {
        debug.send({color:'red'},'This should be red');
    };
    
});


Where does client-side "print" print to?
#2

It would be useful if the log automatically scrolled or posted the new debug statements to the top of the page so you are always looking at the newest message.

Thanks for sending this out. It’s been very helpful.


#3

I have an upgraded version planed, it will include sorting like that. :slight_smile:


#4

There is a new version of this that has auto scrolling, also I’m not sure when I’ll get around to making the really major update I have planned, so I’ll share a bit of info here.

To declare a static channel and make your life a little easier https://debug.midnightrift.com/?channel=mychannel – anyone can send to any channel, so if that bothers you, might want to add some goblygook. https://debug.midnightrift.com/?channel=mychannel-436cb


#5

The code to this has been updated. You can now send post requests to it directly and the channel param has been deprecated.

NEW URL

https://debug.midnightrift.com/:channel

How to post a message

  • it accepts url encoded or JSON.
https://debug.midnightrift.com/:channel/message
message=yourmessage or {message:'yourmessage'}

#6

Oh filter time maybe a good tool.


#7

Thank you for building this, it’s fantastic.