Skip to content

5. Debugging

SomeRandomNoobKekeke edited this page Apr 26, 2026 · 1 revision

It accepts debugger connections via web socket as stated here at the end https://clearscript.clearfoundry.net/Details/Build.html

VSCode, VS and chrome dev tools can connect to it

  • Chrome debugger works, but it's retarded and prone to disconnecting randomly, if you want to try it: open game, go here chrome://inspect/#devices and wait for an hour, then press inspect (20 times)
  • VS debugger either doesn't work or you need to launch the game from VS, i don't remember

VSCode debugger

The JS Debugger, all you need is this launch.json and to press f5

{
  // Use IntelliSense to learn about possible attributes.
  // Hover to view descriptions of existing attributes.
  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Attach to Client ClearScript V8 on port 9222",
      "type": "node",
      "request": "attach",
      "protocol": "inspector",
      "address": "localhost",
      "port": 9222
    },
    {
      "name": "Attach to Server ClearScript V8 on port 9223",
      "type": "node",
      "request": "attach",
      "protocol": "inspector",
      "address": "localhost",
      "port": 9223
    }
  ]
}

Here you can log objects into the console and inspect them

Don't press "Restart", it doens't rescans the scripts, and there's no way to detect it Instead type JS.Restart() in the debug console and press f5 again

Don't press it too fast or it can get deadlocked and then it's gg

Clone this wiki locally