maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   Web console on sailfish-browser (https://talk.maemo.org/showthread.php?t=96491)

juiceme 2016-03-04 13:48

Web console on sailfish-browser
 
This might be an embarassingly n00b question but how can I access the web console of the sailfish browser?
There's no developer tools window AFAIK.

When sailfish-browser is started from the shell it does display quite useful debug messages but no output from javascript, so where do my console.log() prints go to?

The reason why I am curious about it is that I have an application that works correctly in Firefox and Chrome but fails on my Jolla device.

romu 2016-03-04 14:56

Re: Web console on sailfish-browser
 
Quote:

Originally Posted by juiceme (Post 1500636)
The reason why I am curious about it is that I have an application that works correctly in Firefox and Chrome but fails on my Jolla device.

Laverna ?...

juiceme 2016-03-04 16:29

Re: Web console on sailfish-browser
 
Quote:

Originally Posted by romu (Post 1500640)
Laverna ?...

No, Laverna is not my application :D
I am talking about an invoice generator I did recently... https://github.com/juiceme/pantterilasku

gerbick 2016-03-04 16:53

Re: Web console on sailfish-browser
 
Code:

journalctl -af | grep browser
not an option?

juiceme 2016-03-04 17:18

Re: Web console on sailfish-browser
 
Quote:

Originally Posted by gerbick (Post 1500648)
Code:

journalctl -af | grep browser
not an option?

No, browser does not write to journal at all... :(

velox 2016-03-04 17:49

Re: Web console on sailfish-browser
 
Back in the day when android/ios didn't support remote debugging there was this project called weinre – sadly most of the documentation is now 404. But there's some code mirrored at the apache cordova github. Perhaps you can get it running. It emulates the dev tools on your phone and displays it at a remote chrome instance.

Also, something like jsconsole might help you (I have not tested it!).

juiceme 2016-03-04 17:49

Re: Web console on sailfish-browser
 
OK, now I found out the root of half of the problem :p

Why my application did not work on Jolla; the problem was not my javascript, it was actually one of the JSON files I use for configuration... in the latest commit I modified the file format but when I pulled the new version from git to my device I forgot to update the file-in-use to the new template :eek:

But the original question remains; Where do I see the web console output from the browser???

juiceme 2016-03-04 17:54

Re: Web console on sailfish-browser
 
Quote:

Originally Posted by velox (Post 1500651)
Back in the day when android/ios didn't support remote debugging there was this project called weinre – sadly most of the documentation is now 404. But there's some code mirrored at the apache cordova github. Perhaps you can get it running. It emulates the dev tools on your phone and displays it at a remote chrome instance.

Also, something like jsconsole might help you (I have not tested it!).

well, jconsole manual says;

Quote:

Current known support

Remote debugging has been developed to work on all platforms, even if the technology isn't supported. However, jsconsole remote debugging has specifically tested and working on the follow mobile devices (feel free to add to this list):
  • iOS 4.2.x - iPad, iPhone 4
  • Andriod 2.2.2 - Nexus One
  • webOS - Palm Pre

Now what a surprise, there's no mention of SFOS... :p

coderus 2016-03-04 18:01

Re: Web console on sailfish-browser
 
i think you need to write some extension sending you jsconsole logs, as it can be not bridged from gecko to qtmozembed/embedlite components

velox 2016-03-04 18:07

Re: Web console on sailfish-browser
 
Quote:

Originally Posted by juiceme (Post 1500653)
Now what a surprise, there's no mention of SFOS... :p

Well, to be fair, no one knows about SFOS*.

I'd try it anyway. If it doesn't work, ping me via DM and I might take a look if time allows. ;)


Quote:

Originally Posted by coderus (Post 1500654)
i think you need to write some extension sending you jsconsole logs, as it can be not bridged from gecko to qtmozembed/embedlite components

I think the JS-remote-way might really be the way to go (if it's not parse errors or such) – I've successfully used it on <4th-gen iOS, old cordova on android 4 (with that buggy non-chrome webkit) and such to just relay console messages and DOM-tree. It's been a while, though. JS is a bit like chewing gum in a way. :)


*) everyone here knows what I meant – I'd love tell you the opposite, no flame intended.


All times are GMT. The time now is 09:54.

vBulletin® Version 3.8.8