'How do I view the logs from client-side Krunker Editor scripts?

I have setup my Krunker map and am currently trying to get scripting working. I've used the start action hook to log Hello, world! into the logs in a client-side script when the map starts up. However, I don't understand where my logs would be located. Here is my code:

# Client-side script
public action start() {
    GAME.log("Hello, world!");
}

Thanks for any help



Solution 1:[1]

The logs for client-side scripts are located in your browser console. You can usually use CTRL + SHIFT + I or F12 to open the developer tools then navigate to the Console tab. This will include all of the logs. When I run your script and open up my browser console, it has the following contents:

[KRUNKSCRIPT] Hello, world!

Note you may need to scroll through a bit of noise as all logs from the Krunker engine along with any web extensions will be put into that console. However, you are able to filter out results by doing CTRL + F and entering "KRUNKSCRIPT" to filter out all logs to include only the ones that are from your map.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 sno2