3

I am looking for a JavaScript JavaScript debugger.

The situation is as follows: I am making a JS game engine. The AI scripts as well as various other actions are implemented in JS. It is possible, from the engine's developer mode, to edit this code from the browser itself (using Ace).

Now I want to add debugging capabilities. Mostly I am looking for breakpoints with step into/step over support.

I couldn't find any such library. The best I could find is the outdated debug-js project.

Note that this debugger is intended for developers who are building games using my engine. This happens from inside the browser. The engine is in JS. The debugger should be in JS as well. I want full control over these debugging features, so I can't just use the browser's debugger.

For example if you type the ID of a character in an AI script, I highlight this character. This is the kind of things I can't provide if I edit the scripts in the browser's debugger, but that I can do from Ace running in the page.

12
  • What are you using to run this game? Node, IO, a browser, Rhino, Nashorn? Commented Feb 20, 2015 at 15:34
  • 4
    Chrome has a built-in JS debugger - press F12 and go to Sources to access it Commented Feb 20, 2015 at 15:35
  • 2
    Couldn't you just put breakpoints in the relevant AI code? Also, you can edit scripts in Chrome (at least, I can in v40) Commented Feb 20, 2015 at 15:37
  • 1
    I agree with @RPGillespie > you're talking about control of the editor, but not on the whole. If your engine is a blackbox (in this case) won't you limit the control the developer has? Why would you want to control what the debugger can (or cannot) see? A debugger is a debugger . your code or not Commented Feb 20, 2015 at 15:47
  • 1
    You might ask the creators of js.js if there's any way to enable debug support, perhaps. Commented Feb 20, 2015 at 15:48

1 Answer 1

2

Esprima looks like an interesting starting point. It makes it possible to instrument JavaScript code. This JavaScript execution visualization looks particularly promising.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.