Re: Working on a Debugger for Gjs



Hi all,

Just by way of follow up, I've submitted the first set of patches
here[3]. Please feel free to try and break it - I need to know whether
or not I've got the overarching design right before I start adding any
more new features.

Cheers,

Sam.

[3] https://bugzilla.gnome.org/show_bug.cgi?id=744099

On Wed, Feb 4, 2015 at 8:38 PM, Sam Spilsbury <smspillaz gmail com> wrote:
Hi all,

I just wanted to give everyone a heads up that I'm looking into
mplementing an interactive console-based debugger for Gjs based on the
new JS Debugger API in SpiderMonkey [1]. This should be relatively
self-contained work, but I might end up sharing some of the code with
the "coverage mode" I implemented last year.

I'm not too sure how much I can say about the general architecture of
what it will look like internally without also providing code and
tests, which I'm not ready to do yet. Effectively there will be a
switch that you can pass to gjs which puts it into a "debugger" mode
and you'll get a readline-like console with a command tree similar to
what you get in something like gdb.

The planned goals are to allow for the setting and removal of
breakpoints, interrupting the program and providing a stack trace,
catching exceptions, evaluation of arbitrary expression etc.
Potentially we might also expose this as part of libgjs so tools like
gjs-inspector[2] can use it too.

I hope to have some RFC-style patches and tests up on bugzilla in the
next few days for the very basic groundwork to see if I'm taking the
right direction - from there it should be a matter of just
implementing what's already made available to us by SpiderMonkey.

Cheers,

Sam.

[1] https://developer.mozilla.org/en-US/docs/Tools/Debugger-API
[2] https://github.com/alexlarsson/gjs-inspector

--
Sam Spilsbury



-- 
Sam Spilsbury


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]