Skip to content

Conversation

@taneltm
Copy link
Member

@taneltm taneltm commented Jan 28, 2025

Adds the "Web eID" tab to the browser's DevTools.

Features:

  • Event history between the website, extension and native application.
  • Extension's internal log messages.
  • Option to override extension settings, without needing to compile the extension yourself.
  • Option to allow the http://localhost origin when authenticating and signing

The developer tool is disabled by default and needs to be enabled before it can be used.

Firefox

  1. Open [Menu -> Settings -> Extensions and themes]
    or navigate to the address about:addons
  2. Open the Web eID extension details
  3. Open the "Permissions" tab
  4. Toggle "Extend developer tools to access your data in open tabs"

Chrome

  1. Open [Settings -> Extensions]
    or navigate to the address chrome://extensions/
  2. Open the Web eID extension details
  3. Open "Extension options"
  4. Toggle "Enable developer tools"

Screenshots:
Viewing event sequence and the event objects:
image

Viewing the extension's internal log messages:
image

Overriding the extension settings:
image

Resolves WE2-967
Resolves #40

rem(
"Copying static pages to Chrome dist directory"
);
await cp("./static/views", "./dist/chrome/views");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do the Firefox consent pages end up in Chrome as well with this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, installed.html+js ends up in the chrome build, but aren't used. This should be fixed.

@svenzik
Copy link
Contributor

svenzik commented Mar 12, 2025

Usability suggestions from chrome testing:

Events tab: Reloading the page does not clear the events. There is no button for clearing them (also tested that clearing log does not clear events).

Log tab: Even though there is clear button, the chrome console, network tools etc is cleared each time page is reloaded. I suggest we follow that principle.

Please also consider, If we clear the log tab on reload, then chrome console has a setting preserve log. Should we have similar setting?

@taneltm
Copy link
Member Author

taneltm commented Mar 18, 2025

Hi @svenzik!

Good point about not having the ability to clear the events! I'll add it as soon as I have a moment.

However, not clearing the logs on page reload was intentional.
When working on single-page apps, it does make sense to clear the logs on reload, but on multi-page websites where, after auth or sign, you are navigated to another page, and then it would be good to keep the logs.
I would like to keep the current behaviour as default and maybe add a "clear on reload" option. That might be a tiny bit annoying for the SPA developers, but I think it's less confusing for others.
I'll discuss this topic with the team next week before making any decisions on this. I appreciate your feedback about it and will keep it in mind - maybe it would be good to follow the browser DevTools pattern... 🤔

Thank you for taking the time to test it!

taneltm and others added 16 commits November 13, 2025 16:38
Signed-off-by: Tanel Metsar <taneltm@users.noreply.github.com>
Signed-off-by: Tanel Metsar <taneltm@users.noreply.github.com>
Signed-off-by: Tanel Metsar <taneltm@users.noreply.github.com>
…vity

WE2-967

Includes minor cleanup for DevTools related files

Signed-off-by: Tanel Metsar <taneltm@users.noreply.github.com>
WE2-967

Signed-off-by: Sven Mitt <svenzik@users.noreply.github.com>
…pening Web-eID tab

WE2-967

Signed-off-by: Sven Mitt <svenzik@users.noreply.github.com>
…r during loading

WE2-967

Signed-off-by: Sven Mitt <svenzik@users.noreply.github.com>
WE2-967

Signed-off-by: Sven Mitt <svenzik@users.noreply.github.com>
WE2-967

Signed-off-by: Sven Mitt <svenzik@users.noreply.github.com>
WE2-967

Signed-off-by: Sven Mitt <svenzik@users.noreply.github.com>
WE2-967

Signed-off-by: Sven Mitt <svenzik@users.noreply.github.com>
Co-authored-by: Sten Anderson <scopuli-dev@users.noreply.github.com>
WE2-967

Signed-off-by: Sven Mitt <svenzik@users.noreply.github.com>
WE2-967

Signed-off-by: Sven Mitt <svenzik@users.noreply.github.com>
WE2-967

Signed-off-by: Sven Mitt <svenzik@users.noreply.github.com>
…lar to devtools.js

WE2-967

Signed-off-by: Sven Mitt <svenzik@users.noreply.github.com>
…urning optional_permissions -> devtools on

WE2-967

Signed-off-by: Sven Mitt <svenzik@users.noreply.github.com>
Signed-off-by: Mart Somermaa <mrts@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Option for Verbose Debug Log Messages (in Production)

3 participants