Opened 7 years ago

Last modified 15 months ago

#410 reopened enhancement

Component script debugger

Reported by: Philip Owned by: Yves
Priority: Should Have Milestone: Backlog
Component: UI & Simulation Keywords:
Cc:

Description (last modified by leper)

Component scripts are likely to get complex, so there needs to be a reasonable way to debug them. Currently there's just print() going to stdout, which isn't great.

Ideally there'd be a full graphical debugger with source code display and breakpoints and watches and stepping and so on. But that sounds really complex so maybe something simpler would be a more realistic idea.

The implementation should use https://developer.mozilla.org/en-US/docs/Tools/Debugger-API (and likely also https://wiki.mozilla.org/Remote_Debugging_Protocol)

The debugger should be able to pause execution. That means the thread running scripts will be paused inside its JS API calls, and the simulation will be in an inconsistent state. We could perhaps allow the engine to keep running (by using a reentrant game loop, or splitting the simulation into a secondary thread), but we'd need to be very careful since the engine isn't currently designed to do that. It might be better to implement the debugger as part of Atlas (which runs in its own independent thread), so it can communicate with an entirely paused engine, and also so it can use wxWidgets for the UI.

Change History (17)

comment:1 Changed 7 years ago by Philip

Noticed on #jsapi IRC:

Note that any new debugger work on top of jsdbgapi.h is likely to be throw-away code in a month or two!
Or three.
I think the new API will be much like http://code.google.com/p/v8/wiki/DebuggerProtocol

comment:2 Changed 6 years ago by anonymous

  • Milestone Unclassified deleted

Milestone Unclassified deleted

comment:3 Changed 6 years ago by wacko

  • Milestone set to Backlog

comment:4 Changed 6 years ago by kenny

  • Owner changed from Philip to kenny
  • Status changed from new to assigned

comment:5 Changed 6 years ago by k776

  • Milestone changed from Backlog to Alpha 7

comment:6 Changed 6 years ago by k776

  • Type changed from task to enhancement

comment:7 Changed 6 years ago by k776

  • Milestone changed from Alpha 7 to Alpha 8

comment:8 Changed 5 years ago by k776

  • Milestone changed from Alpha 8 to Alpha 9
  • Priority changed from Should Have to Nice to Have

comment:9 Changed 5 years ago by historic_bruno

  • Owner kenny deleted
  • Status changed from assigned to new

comment:10 Changed 5 years ago by k776

  • Milestone changed from Alpha 9 to Backlog

comment:11 Changed 4 years ago by Yves

  • Milestone changed from Backlog to Alpha 13
  • Owner set to Yves

I've started working on something like that and would like to get it stable enough to commit until Alpha 13.
I'll keep updating the forum thread: http://www.wildfiregames.com/forum/index.php?showtopic=16942

comment:12 Changed 4 years ago by Yves

  • Status changed from new to assigned

comment:13 Changed 4 years ago by Yves

In 13238:

Adds the server-side part of the javascript debugger. Refs #410

comment:14 Changed 4 years ago by Yves

In 13239:

The original web GUI for the jsdebugger from contributor mmayfield45. I only removed the jquery demo directory and added some licensing information. This is for an older version of the debuggers server-side part, so it doesn't work anymore. The required modifications will be committed soon. Refs #410

comment:15 Changed 4 years ago by Yves

  • Resolution set to fixed
  • Status changed from assigned to closed

In 13240:

My modifications to the jsdebugger's web GUI. Adds a few features and makes it compatible with the current server-side code. Closes #410

comment:17 Changed 15 months ago by leper

  • Description modified (diff)
  • Milestone changed from Alpha 13 to Backlog
  • Priority changed from Nice to Have to Should Have
  • Resolution fixed deleted
  • Status changed from closed to reopened
Note: See TracTickets for help on using tickets.