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

我用sdebug时可以将hyperf断点停在vendor的Server.php中的sortServers函数里,但是使用yasd不行,是我哪里配置不对吗? #187

Open
wangsen2020 opened this issue Aug 18, 2023 · 2 comments

Comments

@wangsen2020
Copy link

Please answer these questions before submitting your issue. Thanks!

  1. What did you do? If possible, provides a simple script and debug step to reproduce the problem.

phpstorm2022版本,按照文档配置了远程调试,配置信息如下:
zend_extension=yasd
yasd.debug_mode=remote
yasd.depth=3
yasd.remote_host=192.168.0.106
yasd.remote_port=9000

hyperf使用的是2.0框架,php是7.2版本,centos系统,phpstorm使用的远程php解释器
composer create-project hyperf/hyperf-skeleton=2.0 hyperf-server

配置完成后,IndexController是能够监听到的,但是
image
打好断点,使用debug调试时,发过来的信息不能停在这里,我使用地ide自带的php脚本调试器配置
image

但是使用sdebug,则点击debug时可以停在这里,这让我很费解,该问题以前也有,但是我看没人提过

  1. What did you expect to see?

我期待yasd也能断点停在这里,让我能够很好的观察hyperf的启动过程调用栈

  1. What did you see instead?

  2. What is your machine environment used (show your uname -a & php -v & gcc -v) ?
    环境应该都装好了,只是vendor中的代码不能断点调试
    image
    image

image

@huanghantao
Copy link
Member

在hyperf.php里面打断点试试先,看看能不能停住

@wangsen2020
Copy link
Author

在hyperf.php里面打断点试试先,看看能不能停住

可以的,hyperf.php这里能进去的,甚至能走到Application::run()函数里面去,但是再深就没反应了,并非是在等待,而是服务已经启动完成了,所以上图那个sortServers()是不会被监听到的,但是使用sdebug则没有这个问题,昨天我尝试了好几次都是这样,你可以同时运行两种debug,我上面给了IDE的debug方式
image

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

No branches or pull requests

2 participants