Skip to content

Prettify debug output

Kai Uwe Broulik requested to merge work/kbroulik/prettify-debug into master
  • Use console.info and console.error for qInfo and qCritical, respectively
  • Add file name and line numbers, if available
  • Use colored "Host" prefix instead of "From host"

Before:

Screenshot_20211013_143102

After (release build, screwed up the text color in this screenshot)

Screenshot_20211013_142839

After (debug build)

Screenshot_20211013_143028

Tested in both Chrome and Firefox. Chrome does not show the (i) prefix for console.info but otherwise shows the message fine.

For compatibility with older extension versions, the action remains debug and warning, so those messages are never lost.

@fvogt @davidedmundson

Merge request reports