edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Dominique Martinet <asmadeus@codewreck.org>
To: Karl Dahlke <eklhad@comcast.net>
Cc: Edbrowse-dev@lists.the-brannons.com
Subject: Re: [Edbrowse-dev] version
Date: Sun, 18 Feb 2018 09:47:53 +0100	[thread overview]
Message-ID: <20180218084753.GB31140@nautica> (raw)
In-Reply-To: <20180218081709.GA31140@nautica>

Dominique Martinet wrote on Sun, Feb 18, 2018:
> Definitely not something we want integrated before a release but could
> help in a separate branch just to test, will send a mail with some
> instructions once I got it to move again


So, as a prerequisite, ou need a debugger-enabled duktape, or edbrowse
will segfault. There must be some way to detect if we can use it and
enable debugger only if this will work, but I don't know how yet.

To do that, you need to go to your duktape sources and edit
src/duk_config.h, look for DEBUGGER macros and change the undefs into
defines
I have enabled these:
#define DUK_USE_DEBUGGER_DUMPHEAP
#define DUK_USE_DEBUGGER_INSPECT
#define DUK_USE_DEBUGGER_PAUSE_UNCAUGHT
#define DUK_USE_DEBUGGER_SUPPORT
#define DUK_USE_DEBUGGER_THROW_NOTIFY

Debugger support is necessary, and requires DUK_USE_INTERRUPT_COUNTER
I think throw notify is what lets us print caught exceptions, we
wouldn't know otherwise.
Pause uncaught lets us print something on uncaught errors, we already do
that so you might not want it, but ultimately should let us run jdb
commands in the context of the error with local variables which might be
helpful.
I think inspect is what would let us run 'eval' commands within debugger
context, and dumpheap is a command to dump all local variables which I
haven't used yet either but both might be useful.

In duk_config.h, there also is DUK_USE_DEBUG which can print a lot of
messages from duktape, I tried this once but it does not help me much


Then make -f Makefile.sharedlibrary or build/install as usual

Then recompile edbrowse on my 'debugger' branch:
 git fetch https://github.com/martinetd/edbrowse.git debugger
 git merge FETCH_HEAD
(or whatever you usually do to pull changes)

And browsing should print caught throws, for example google.com gives me this:
./edbrowse http://google.com
13001
Enabling debugger
420
caught throw: TypeError: undefined not callable (property 'insertRow' of [object Object]) (line 244)
caught throw: TypeError: cannot read property 'getItem' of null (line 121)

(might want to change my prints to only show starting db3 or something,
but this is really prototype stage)


Hope this helps,
-- 
Dominique

  reply	other threads:[~2018-02-18  8:47 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-15 11:56 Karl Dahlke
2018-02-15 18:48 ` Adam Thompson
2018-02-15 21:04   ` Karl Dahlke
2018-02-16 19:11     ` Adam Thompson
2018-02-18  2:19   ` Karl Dahlke
2018-02-18  2:42     ` Kevin Carhart
2018-02-18  3:03       ` Karl Dahlke
2018-02-18  3:39         ` Kevin Carhart
2018-02-18  7:43           ` Karl Dahlke
2018-02-18  8:17             ` Dominique Martinet
2018-02-18  8:47               ` Dominique Martinet [this message]
2018-02-18  8:30             ` Kevin Carhart
2018-02-18  7:45         ` Kevin Carhart
2018-02-18  8:55           ` Karl Dahlke
2018-02-18 11:29           ` Karl Dahlke
2018-02-18 14:08           ` Karl Dahlke
2018-02-19  1:07             ` [Edbrowse-dev] version / dyndns Kevin Carhart
2018-02-19  3:58               ` [Edbrowse-dev] update on dyndns Kevin Carhart
2018-03-24 16:07 [Edbrowse-dev] version Karl Dahlke
2018-03-25  8:11 ` Kevin Carhart
2018-06-11 15:45 [edbrowse-dev] version Karl Dahlke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180218084753.GB31140@nautica \
    --to=asmadeus@codewreck.org \
    --cc=Edbrowse-dev@lists.the-brannons.com \
    --cc=eklhad@comcast.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).