This Trac instance is not used for development anymore!

We migrated our development workflow to git and Gitea.
To test the future redirection, replace trac by ariadne in the page URL.

Opened 15 years ago

Last modified 6 years ago

#410 reopened enhancement

Component script debugger

Reported by: Philip Taylor Owned by: Yves
Priority: Should Have Milestone: Backlog
Component: Simulation Keywords:
Cc: Patch:

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 (18)

comment:1 by Philip Taylor, 15 years ago

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 by (none), 14 years ago

Milestone: Unclassified

Milestone Unclassified deleted

comment:3 by Andrew, 14 years ago

Milestone: Backlog

comment:4 by Kenny Long, 13 years ago

Owner: changed from Philip Taylor to Kenny Long
Status: newassigned

comment:5 by Kieran P, 13 years ago

Milestone: BacklogAlpha 7

comment:6 by Kieran P, 13 years ago

Type: taskenhancement

comment:7 by Kieran P, 13 years ago

Milestone: Alpha 7Alpha 8

comment:8 by Kieran P, 13 years ago

Milestone: Alpha 8Alpha 9
Priority: Should HaveNice to Have

comment:9 by historic_bruno, 13 years ago

Owner: Kenny Long removed
Status: assignednew

comment:10 by Kieran P, 13 years ago

Milestone: Alpha 9Backlog

comment:11 by Yves, 12 years ago

Milestone: BacklogAlpha 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:13 by Yves, 12 years ago

In 13238:

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

comment:14 by Yves, 12 years ago

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 by Yves, 12 years ago

Resolution: fixed
Status: assignedclosed

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 by leper, 9 years ago

Description: modified (diff)
Milestone: Alpha 13Backlog
Priority: Nice to HaveShould Have
Resolution: fixed
Status: closedreopened

comment:18 by Imarok, 6 years ago

Component: UI & SimulationSimulation

Move tickets to Simulation as UI & Simulation got some sub components.

Note: See TracTickets for help on using tickets.