yiisoft / yii2-debug

Debug Extension for Yii 2
http://www.yiiframework.com
BSD 3-Clause "New" or "Revised" License
202 stars 150 forks source link

Extend toolbar with POST 302 data #38

Open dynasource opened 9 years ago

dynasource commented 9 years ago

When a page has issues/errors during a Post + 302, you cannot see this in the updated toolbar. I would like to see this somehow because its valuable information you dont see.

I would like to eloborate on a solution for this. It could be done by either:

samdark commented 9 years ago

There's already a dropdown:

18qb6nvl

dynasource commented 9 years ago

yes, I am familiar with that downdown, but a few clicks are needed to get there, at most of the time 4 clicks 1) click on the toolbar at the bottom 2) click at the profile menu 3) click at last 10 4) find and click at the POST

When debugging a POST, preferably, I would not have to click at all but see immediately if something was wrong.

samdark commented 9 years ago

Well, it was wrong not in the current request.

dynasource commented 9 years ago

I am not saying the toolbar should be removed for the current request, I am advocating to improve visibility for non-visible requests (redirects), which I do think makes sense.

samdark commented 9 years ago

What about AJAX requests? These are non visible as well. And there could be 100 requests while the main one is active.

dynasource commented 9 years ago

reporting these could be handy as well, but in a separate solution. 100 rows would now be practical as you pointed, a dropdown would fit better.

About non-ajax redirects (which will usually will be 1) what do you think about adding an extra row in de toolbar? It also improves visibility on the fact that a REDIRECT has occurred.

samdark commented 9 years ago

OK. It makes sense overall. So:

  1. If current request was redirect, display an extra badge colored in response status of the original request.
  2. When clicked, it will lead you to previous request opened in full debugger.

Correct?

dynasource commented 9 years ago

1) could be an extra badge, but I see more value in showing a complete row with the same data as the current GET request:

2) correct

dynasource commented 9 years ago

@samdark: why not implement both. Than the user can decide what to use.

dynasource commented 9 years ago

I have another usecase. I was doing some refactoring in some of my own core components and after a while I came to the conclusion that my POSTs got 5 X slower.

I can not easily be notified about this with the current toolbar. I could have when supplied with another row about the POST request, supplying me with figures about memory & total time.

dynasource commented 9 years ago

screenshot

This pic is to show you my intentions. The summary bar of the previous request is only shown when 302 POSTs occur.

samdark commented 9 years ago

@dynasource affirmative. Intention understood. Overall it should be useful.

samdark commented 9 years ago

7288372c-4101-11e5-8839-fdeeda44b8fd

dynasource commented 9 years ago
samdark commented 9 years ago

Well, it doesn't make sense to display it twice. Not sure how to handle it in the best way though...

dynasource commented 9 years ago

the current output is like this: post-taskbar

I am using this for a while now and I am very happy with it. Is it valuable enough to implement? If not, please tell me, than I will start to implement my own version/hook.

samdark commented 9 years ago

Yes, I think I'll merge it. Still not sure about visual part of it. It looks a bit misleading so probably we need a way to hint that it was a redirect and that's why there are 2 rows. Something like the following:

b4b780da-5240-11e5-81a1-ef680fd1fefa

dynasource commented 9 years ago

true, despite the double logos etc, I liked https://github.com/yiisoft/yii2-debug/issues/38#issuecomment-130289542 better because of design consistency.

With respect to the hint for the redirect, its quite clear with the status 302. But you have to get used to it in the beginning, thats true.