Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Graphic Interface for debugging requests #35

Open
felipenmoura opened this issue Sep 14, 2016 · 2 comments
Open

Add a Graphic Interface for debugging requests #35

felipenmoura opened this issue Sep 14, 2016 · 2 comments

Comments

@felipenmoura
Copy link
Member

There should be a panel or tool with some UX for debugging the requests.

We already can use the trace method to get the debugging information:

DSW.trace('.*', function(traceData){
    console.log(traceData);
});

All we need is a better way to show the information, and perhaps to define the traced requests.

@renanbastos93
Copy link

I want help. You can explain better this issue?
Where I can start?

@felipenmoura
Copy link
Member Author

Nice! :)

Well, I see two ways we can do that, but I'm open for suggestions.
One, is a Console plugin/extension (for chrome and firefox). We could add a new tab to it (like react devtools does).
The other way, would be a regular panel made in html, added to the page with some useful tools.
DSW uses postMessage to communicate between the Service Worker and the client(s), that's how the .trace method works.

By simply listening for .* with trace, we will get all the data from any request as an object.
It's just a matter of grouping them and adding some cool "view" features, like filters, clean, find, etc.

We could enable this div if the user run something like DSW.initDebugConsole() in the browser console.
The only thing here, is that if the page reloads, the first requests will not be logged.
An interesting feature could be to "re-trigger" a given request, like "/".

What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants