

Grafana is a popular tool used by many players, you can either set up your own with this guide: or use a hosted service provided by Screeps Plus.
SCREEPS DOC UPDATE
Once a path is being viewed, you need to close it and reopen to have it update (they update every tick unless actively viewed), and modifications are submitted next tick. This allows you to check into or even create various memory objects without having to add checks into code, or print it out to the console.
SCREEPS DOC CODE
These tools allow the user to see in 'real time' the actions or states of their creeps to determine flaws in logic, code errors or the like.Īlong with your script/console, you also have a Memory tab which is the Memory Viewer. Screeps provides some powerful visual feedback tools for debugging your creep's actions or actions of your script. The returned error should be formatted as File With the Error : The Line it is occurring at : The Character that is the problem Try should print you the stack with the line number to better help determine the source of the error.Įrrors that cause your script to stop executing, these should provide a stack/line number you can trace down into your code to determine where the error is being caused. You can take a look at some examples in the Screepers' Snippets on Github, or check out the #client-abuse channel on Slack. This can be very helpful to add extra information into console, or make it more dynamic / easier to access rooms and much more. This is due to console being mainly able to accept HTML, which allows for a whole host of things ranging from playing audio, creating links and buttons, to actually adding onto the UI itself. While a User should not modify the console.log itself, (the developers have warned against this) it is quite possible to use the console in many ways beyond simple text-output. You can see some examples of this in Screeps' official docs page on debugging, along with helpful tips about how returns from methods work and can be displayed.Ĭonsole & Client-Abuse If you want to see plain-text versions of objects (as they would print as in most cases) you can use JSON.stringifiy() to convert the object to plain text which makes it much easier to determine many things.

Console.log() will print to the game's console, you can add various variables, strings and the like to the printout.
