[wpe-webkit] Debugging options with wpewebkit

Adrian Perez de Castro aperez at igalia.com
Thu Oct 4 05:20:46 PDT 2018


Hello again Aras,

I noticed that you forgot to keep the mailing list in copy, so I have added
it again — it is nice to have the reply with your solution also archived for
future reference :)

On Thu, 4 Oct 2018 12:54:40 +0100, Aras Vaichas <aras.vaichas at gmail.com> wrote:
 
> Thank you for the help, everything is working now.  For the sake of
> completeness, I'll put down the solution which worked for me.

Glad to know that it is working for you now. That's great.

> On Wed, 3 Oct 2018 at 16:13, Adrian Perez de Castro <aperez at igalia.com>
> wrote:
> > For console logs there are two possibilities. The simplest is to use
> > “webkit_settings_set_enable_write_console_messages_to_stdout()” [0] in
> > your application.
> ...
> > The remote inspector is well supported since version 2.20.0. You need to
> > call “webkit_settings_set_enable_developer_extras()” [4] — otherwise the
> > “WEBKIT_INSPECTOR_SERVER” environment variable is ignored.
> 
> target:
> # export WEBKIT_INSPECTOR_SERVER='127.0.0.1:8000'
> # cat << EOF > cog.cfg
> [websettings]
> enable-write-console-messages-to-stdout=true
> enable-developer-extras=true
> EOF
> # cog --version
> 0.1.0
> # cog -C cog.cfg index.html

Ah, somehow I did not notice that you were already using Cog. You are right,
and using a configuration file is indeed much easier because then you don't
need to edit any source code.

With Cog there's also command line options which have the same names, so
this also works:

  # WEBKIT_INSPECTOR_SERVER='127.0.0.1:8000' cog \
      --enable-write-console-messages-to-stdout=true \
	  --enable-developer-extras=true ${URL}

Of course the configuration file is more convenient if you are setting many
options — I just want to make you know that the command line options are
available as well :)

Cheers,

-Adrián

> host: (my target is connected via ADB)
> $ sudo apt-get install epiphany-browser
> $ adb forward tcp:8080 tcp:8000
> $ epiphany --version
> Web 3.18.11
> $ epiphany inspector://localhost:8080
> 
> regards,
> 
> Aras Vaichas
> 
> > [0] https://webkitgtk.org/reference/webkit2gtk/stable/WebKitSettings.html#webkit-settings-set-enable-write-console-messages-to-stdout
> > [1] https://webkitgtk.org/reference/webkit2gtk/stable/WebKitWebExtension.html
> > [2] https://webkitgtk.org/reference/webkit2gtk/stable/WebKitWebPage.html#WebKitWebPage-console-message-sent
> > [3] https://webkitgtk.org/reference/webkit2gtk/stable/WebKitSettings.html#webkit-settings-set-enable-developer-extras
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.webkit.org/pipermail/webkit-wpe/attachments/20181004/49b79f7d/attachment.bin>


More information about the webkit-wpe mailing list