hyperf 怎么调试更方便?

hyperf 项目启动报错信息在控制台打印,但是不像laravel 提示的那么详细清晰,hyperf大佬们都怎么调试的?
就像这种异常,就没有laravel 那么清晰明了,非常影响效率

[ERROR] #0 /www/pw-service/runtime/container/proxy/App_Controller_V1_User_Wallet_UserWithdrawController.proxy.php(41): App\Repository\User\Wallet\UserWithdrawOrderRepository->save(3, 10, 10138)
#1 /www/pw-service/vendor/hyperf/http-server/src/CoreMiddleware.php(148): App\Controller\V1\User\Wallet\UserWithdrawController->save(Object(App\Request\V1\UserWallet\UserWithdrawOrderSaveRequest))
#2 /www/pw-service/vendor/hyperf/http-server/src/CoreMiddleware.php(97): Hyperf\HttpServer\CoreMiddleware->handleFound(Object(Hyperf\HttpServer\Router\Dispatched), Object(Hyperf\HttpMessage\Server\Request))
#3 /www/pw-service/vendor/hyperf/dispatcher/src/AbstractRequestHandler.php(45): Hyperf\HttpServer\CoreMiddleware->process(Object(Hyperf\HttpMessage\Server\Request), Object(Hyperf\Dispatcher\HttpRequestHandler))
#4 /www/pw-service/vendor/hyperf/dispatcher/src/HttpRequestHandler.php(27): Hyperf\Dispatcher\AbstractRequestHandler->handleRequest(Object(Hyperf\HttpMessage\Server\Request))
#5 /www/pw-service/runtime/container/proxy/App_Middleware_UserAuthMiddleware.proxy.php(69): Hyperf\Dispatcher\HttpRequestHandler->handle(Object(Hyperf\HttpMessage\Server\Request))
#6 /www/pw-service/vendor/hyperf/dispatcher/src/AbstractRequestHandler.php(45): App\Middleware\UserAuthMiddleware->process(Object(Hyperf\HttpMessage\Server\Request), Object(Hyperf\Dispatcher\HttpRequestHandler))
#7 /www/pw-service/vendor/hyperf/dispatcher/src/HttpRequestHandler.php(27): Hyperf\Dispatcher\AbstractRequestHandler->handleRequest(Object(Hyperf\HttpMessage\Server\Request))
#8 /www/pw-service/vendor/hyperf/tracer/src/Middleware/TraceMiddleware.php(56): Hyperf\Dispatcher\HttpRequestHandler->handle(Object(Hyperf\HttpMessage\Server\Request))
#9 /www/pw-service/vendor/hyperf/dispatcher/src/AbstractRequestHandler.php(45): Hyperf\Tracer\Middleware\TraceMiddleware->process(Object(Hyperf\HttpMessage\Server\Request), Object(Hyperf\Dispatcher\HttpRequestHandler))
#10 /www/pw-service/vendor/hyperf/dispatcher/src/HttpRequestHandler.php(27): Hyperf\Dispatcher\AbstractRequestHandler->handleRequest(Object(Hyperf\HttpMessage\Server\Request))
#11 /www/pw-service/vendor/hyperf/validation/src/Middleware/ValidationMiddleware.php(83): Hyperf\Dispatcher\HttpRequestHandler->handle(Object(Hyperf\HttpMessage\Server\Request))
#12 /www/pw-service/vendor/hyperf/dispatcher/src/AbstractRequestHandler.php(45): Hyperf\Validation\Middleware\ValidationMiddleware->process(Object(Hyperf\HttpMessage\Server\Request), Object(Hyperf\Dispatcher\HttpRequestHandler))
#13 /www/pw-service/vendor/hyperf/dispatcher/src/HttpRequestHandler.php(27): Hyperf\Dispatcher\AbstractRequestHandler->handleRequest(Object(Hyperf\HttpMessage\Server\Request))
#14 /www/pw-service/app/Middleware/RequestLogMiddleware.php(66): Hyperf\Dispatcher\HttpRequestHandler->handle(Object(Hyperf\HttpMessage\Server\Request))
#15 /www/pw-service/vendor/hyperf/dispatcher/src/AbstractRequestHandler.php(45): App\Middleware\RequestLogMiddleware->process(Object(Hyperf\HttpMessage\Server\Request), Object(Hyperf\Dispatcher\HttpRequestHandler))
#16 /www/pw-service/vendor/hyperf/dispatcher/src/HttpRequestHandler.php(27): Hyperf\Dispatcher\AbstractRequestHandler->handleRequest(Object(Hyperf\HttpMessage\Server\Request))
#17 /www/pw-service/app/Middleware/MobileVerifyMiddleware.php(69): Hyperf\Dispatcher\HttpRequestHandler->handle(Object(Hyperf\HttpMessage\Server\Request))
#18 /www/pw-service/vendor/hyperf/dispatcher/src/AbstractRequestHandler.php(45): App\Middleware\MobileVerifyMiddleware->process(Object(Hyperf\HttpMessage\Server\Request), Object(Hyperf\Dispatcher\HttpRequestHandler))
#19 /www/pw-service/vendor/hyperf/dispatcher/src/HttpRequestHandler.php(27): Hyperf\Dispatcher\AbstractRequestHandler->handleRequest(Object(Hyperf\HttpMessage\Server\Request))
#20 /www/pw-service/app/Middleware/LocaleMiddleware.php(52): Hyperf\Dispatcher\HttpRequestHandler->handle(Object(Hyperf\HttpMessage\Server\Request))
#21 /www/pw-service/vendor/hyperf/dispatcher/src/AbstractRequestHandler.php(45): App\Middleware\LocaleMiddleware->process(Object(Hyperf\HttpMessage\Server\Request), Object(Hyperf\Dispatcher\HttpRequestHandler))
#22 /www/pw-service/vendor/hyperf/dispatcher/src/HttpRequestHandler.php(27): Hyperf\Dispatcher\AbstractRequestHandler->handleRequest(Object(Hyperf\HttpMessage\Server\Request))
#23 /www/pw-service/app/Middleware/ClientIpMiddleware.php(31): Hyperf\Dispatcher\HttpRequestHandler->handle(Object(Hyperf\HttpMessage\Server\Request))
#24 /www/pw-service/vendor/hyperf/dispatcher/src/AbstractRequestHandler.php(45): App\Middleware\ClientIpMiddleware->process(Object(Hyperf\HttpMessage\Server\Request), Object(Hyperf\Dispatcher\HttpRequestHandler))
#25 /www/pw-service/vendor/hyperf/dispatcher/src/HttpRequestHandler.php(27): Hyperf\Dispatcher\AbstractRequestHandler->handleRequest(Object(Hyperf\HttpMessage\Server\Request))
#26 /www/pw-service/app/Middleware/CorsMiddleware.php(38): Hyperf\Dispatcher\HttpRequestHandler->handle(Object(Hyperf\HttpMessage\Server\Request))
#27 /www/pw-service/vendor/hyperf/dispatcher/src/AbstractRequestHandler.php(45): App\Middleware\CorsMiddleware->process(Object(Hyperf\HttpMessage\Server\Request), Object(Hyperf\Dispatcher\HttpRequestHandler))
#28 /www/pw-service/vendor/hyperf/dispatcher/src/HttpRequestHandler.php(27): Hyperf\Dispatcher\AbstractRequestHandler->handleRequest(Object(Hyperf\HttpMessage\Server\Request))
#29 /www/pw-service/vendor/hyperf/dispatcher/src/HttpDispatcher.php(35): Hyperf\Dispatcher\HttpRequestHandler->handle(Object(Hyperf\HttpMessage\Server\Request))
#30 /www/pw-service/vendor/hyperf/http-server/src/Server.php(112): Hyperf\Dispatcher\HttpDispatcher->dispatch(Object(Hyperf\HttpMessage\Server\Request), Array, Object(Hyperf\HttpServer\CoreMiddleware))
#31 [internal function]: Hyperf\HttpServer\Server->onRequest(Object(Swoole\Http\Request), Object(Swoole\Http\Response))
#32 {main}
《L04 微信小程序从零到发布》
从小程序个人账户申请开始,带你一步步进行开发一个微信小程序,直到提交微信控制台上线发布。
《L03 构架 API 服务器》
你将学到如 RESTFul 设计风格、PostMan 的使用、OAuth 流程,JWT 概念及使用 和 API 开发相关的进阶知识。
讨论数量: 16

你贴出来的内容只有函数调用栈的信息,怎么异常信息都没有哦

2个月前 评论
Pon (楼主) 2个月前
王成涛 (作者) 2个月前

file 因为一直报这个警告 所以我log_level 设置成的5

2个月前 评论

我说的是 config.php 配置文件中log_level,你可以这样设置方便调试

.
.
.
StdoutLoggerInterface::class => [
        'log_level' => [
            LogLevel::ALERT,
            LogLevel::CRITICAL,
            LogLevel::DEBUG,
            LogLevel::EMERGENCY,
            LogLevel::ERROR,
            LogLevel::INFO,
            LogLevel::NOTICE,
            LogLevel::WARNING,
        ],
    ],
.
.
.
2个月前 评论
Pon (楼主) 2个月前

楼主看看扩展是不是有个xdebug,有的话不加载xdebug试试看看

2个月前 评论
Pon (楼主) 2个月前
Pon (楼主) 2个月前

WARNING Worker::report_error(): worker(pid=33094,id=15)abnormal exit, status=0, signal=11

SIGTERM 15 A 终止信号

你是用了 exit 把

2个月前 评论
Pon (楼主) 2个月前

github.com/qiutuleng/hyperf-dump-s... 用这个包,就可以用laravel中的dd和dump了

2个月前 评论
Pon (楼主) 2个月前
Pon (楼主) 2个月前
Pon (楼主) 2个月前

报错一般都是php抛出的的异常 堆栈信息是php调用框架的信息 框架只是做了展示

2个月前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!