Debugging javascript in webview / QML

I’m trying to figure out if I can get webview console output to the qt creator application output. I’ve only ever been able to do debugging from QML directly. Any hints?

Does this help?

https://sailfishos.org/wiki/WorkingWithBrowser

2 Likes

I. Always. Forget. The. Wiki. Man. Thanks!
It’s not exactly what i was looking for, but it will probably get me there! I’m debugging a webview, not the browser, but this is a good start.

  EMBED_CONSOLE=1 sailfish-browser

EDIT: This works great with the browser. It does not work with webengine views.

Am reading:
https://doc.qt.io/Qt-5/qtwebengine-debugging.html

2 Likes

Actually, it does work. No idea what I was doing, but just now:

EMBED_CONSOLE=1 sailfish-qml harbour-moremahjong

Although not to the SDK at least to the cli. Still haven’t gone the whole way :slight_smile:

2 Likes