yiisoft / yii2-debug

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

include command debug for yii2 #490

Closed chicuongit913 closed 2 years ago

chicuongit913 commented 2 years ago
Q A
Is bugfix?
New feature? ✔️ allow debug when execute command
Breaks BC?
Fixed issues
samdark commented 2 years ago

That's great PR 👍. But there are issues:

  1. When trying to view saved console request data, "Request", it ends up with "Calling unknown method: yii\console\Request::getHeaders()".
  2. At the requests index page, it's not prepared to display console return statuses so the color for 0 is red etc. 0 should be green.
  3. At the requests index page titles could be adjusted to reflect commands i.e. "URL/command" instead of "URL" etc.
  4. At the toolbar, "route" title could be either adjusted or, better, removed since it's not "Route" anymore.
chicuongit913 commented 2 years ago

That's great PR 👍. But there are issues:

  1. When trying to view saved console request data, "Request", it ends up with "Calling unknown method: yii\console\Request::getHeaders()".
  2. At the requests index page, it's not prepared to display console return statuses so the color for 0 is red etc. 0 should be green.
  3. At the requests index page titles could be adjusted to reflect commands i.e. "URL/command" instead of "URL" etc.
  4. At the toolbar, "route" title could be either adjusted or, better, removed since it's not "Route" anymore.

Fixed!

samdark commented 2 years ago

Awesome. Would you please add a line for CHANGELOG?

chicuongit913 commented 2 years ago

added change log

samdark commented 2 years ago

Thanks!

chicuongit913 commented 1 year ago

Hi Samdark, i just curious that when you will publish the tag 2.1.21?

samdark commented 1 year ago

Well, nothing's holding me from doing it right now :)

samdark commented 1 year ago

Done.

chicuongit913 commented 1 year ago

great, thanks

nadar commented 1 year ago

@chicuongit913 This is a great PR! Thank you. Now we are even able to debug queue jobs without pain! Thanks

vadim-bulochnik commented 1 year ago

Is there some documentation about how to perform commands debugging?

nadar commented 1 year ago

@vadim-bulochnik just add the debug toolbar to the console.php configuration and you are done.

nadar commented 1 year ago

@vadim-bulochnik => https://github.com/yiisoft/yii2-app-basic/pull/277

vadim-bulochnik commented 1 year ago

@vadim-bulochnik just add the debug toolbar to the console.php configuration and you are done.

Yes, this is done. But how to use this debug toolbar in console? :) Sorry for stupid question.

nadar commented 1 year ago

Just as you normally would, via browser http://localhost/debug (or whatever setup you have) and you will see the console requests "flagged" as COMMAND (instead of GET, POST, etc.)

vadim-bulochnik commented 1 year ago

Just as you normally would, via browser http://localhost/debug (or whatever setup you have) and you will see the console requests "flagged" as COMMAND (instead of GET, POST, etc.)

Thanks, but I still can't see console requests. I have a feeling that for console need to setup another url for debug toolbar, because for example debug toolbar in backend application shows only logs from backend, and debug toolbar in frontend application - shows logs from frontend. Thus, I think should be a way to setup debug toolbar for console application, but not sure how.

samdark commented 1 year ago

Yes. For advanced template there are some adjustments needed so app writes its data to one of backend/frontend directories.

vadim-bulochnik commented 1 year ago

Yes. For advanced template there are some adjustments needed so app writes its data to one of backend/frontend directories.

Thanks for information! Will wait for improvements :)

chicuongit913 commented 1 year ago

Hi Alexander,

I just curious that do you have plan to release the version 2.1.21 for yii/debug, my team members need that feature for debugging.

Thanks

Vào CN, 4 thg 9, 2022 vào lúc 12:11 Alexander Makarov < @.***> đã viết:

Thanks!

— Reply to this email directly, view it on GitHub https://github.com/yiisoft/yii2-debug/pull/490#issuecomment-1236398537, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABBGE47U567AI5SQHEKAFKDV4TX5TANCNFSM52D3OLJQ . You are receiving this because you authored the thread.Message ID: @.***>

nadar commented 1 year ago

@chicuongit913 it has been released already 2.1.21 September 06, 2022

vadim-bulochnik commented 1 year ago

@chicuongit913 it has been released already 2.1.21 September 06, 2022

Yes, but this version doesn't include commands debug support for advanced template.

samdark commented 1 year ago

It's easy to add yourself in console app bootstrap.

vadim-bulochnik commented 1 year ago

It's easy to add yourself in console app bootstrap.

I didn't manage to find corresponding configuration of Debug module for this.

vadim-bulochnik commented 1 year ago

It's easy to add yourself in console app bootstrap.

Do you mean this param? `/**

samdark commented 1 year ago

Yes.