swoole / yasd

Yet Another Swoole Debugger
https://huanghantao.github.io/yasd-wiki/
Apache License 2.0
357 stars 35 forks source link

macos(M1X) + yasd + hyperf debug报错 #171

Closed mmfei closed 1 year ago

mmfei commented 2 years ago

Please answer these questions before submitting your issue.

  1. What did you do? If possible, provide a simple script for reproducing the error.
    php -e ./bin/hyperf.php start
    phpstorm 开启debug监听
    请求任何一个链接就崩溃
  2. What did you expect to see?

期望正常运行

  1. What did you see instead?
[yasd] recv command error, connection closed  #开了监听也是debug不了的
[yasd] recv command error, Connection reset by peer
[2022-05-28 11:31:12 $89777.0]  WARNING Server::check_worker_exit_status(): worker(pid=89778, id=0) abnormal exit, status=0, signal=11
A bug occurred in Swoole-v4.8.1, please report it.
The Swoole developers probably don't know about it,
and unless you report it, chances are it won't be fixed.
You can read How to report a bug doc before submitting any bug reports:
>> https://github.com/swoole/swoole-src/blob/master/.github/ISSUE.md 
Please do not send bug reports in the mailing list or personal letters.
The issue page is also suitable to submit feature requests.

OS: Darwin 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:37 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T6000 arm64
GCC_VERSION: Apple LLVM 13.0.0 (clang-1300.0.29.3)
OPENSSL_VERSION: OpenSSL 3.0.0 7 sep 2021
PHP_VERSION : 7.4.25
  1. What version of Yasd are you using (show your php --ri yasd)?

    
    
    php --ri yasd

yasd

Yasd => enabled Author => codinghuang codinghuang@qq.com Version => 0.3.9-alpha Built => Jun 13 2022 16:25:33

Directive => Local Value => Master Value yasd.breakpoints_file => no value => no value yasd.debug_mode => remote => remote yasd.remote_host => 127.0.0.1 => 127.0.0.1 yasd.remote_port => 9001 => 9001 yasd.depth => 1 => 1 yasd.log_level => -1 => -1 yasd.max_executed_opline_num => 0 => 0 yasd.init_file => no value => no value yasd.open_extended_info => 0 => 0 xdebug.coverage_enable => 1 => 1 xdebug.profiler_enable => 1 => 1 xdebug.remote_autostart => 1 => 1 xdebug.remote_connect_back => 0 => 0 xdebug.remote_mode => req => req xdebug.idekey => hantaohuang => hantaohuang

php --ri swoole

swoole

Swoole => enabled Author => Swoole Team team@swoole.com Version => 4.8.9 Built => Jun 13 2022 16:21:32 coroutine => enabled with boost asm context kqueue => enabled rwlock => enabled sockets => enabled openssl => OpenSSL 3.0.0 7 sep 2021 dtls => enabled http2 => enabled json => enabled curl-native => enabled pcre => enabled zlib => 1.2.11 mysqlnd => enabled async_redis => enabled

Directive => Local Value => Master Value swoole.enable_coroutine => On => On swoole.enable_library => On => On swoole.enable_preemptive_scheduler => Off => Off swoole.display_errors => On => On swoole.use_shortname => Off => Off swoole.unixsock_buffer_size => 262144 => 262144

5. What is your machine environment used (show your `uname -a` & `php -v` & `gcc -v`) ?

❯ uname -a Darwin MacBook-Pro.local 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:37 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T6000 arm64 ❯ php -v PHP 7.4.25 (cli) (built: Nov 5 2021 12:57:11) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.25, Copyright (c), by Zend Technologies with Yasd v0.3.9-alpha, Our Copyright, by codinghuang ❯ gcc -v

Apple clang version 13.1.6 (clang-1316.0.21.2.5) Target: arm64-apple-darwin21.5.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin ❯



会不会是不是m1导致的?

<img width="621" alt="image" src="https://user-images.githubusercontent.com/3683362/170808523-c582d495-02e3-4e40-955e-138bc5f70062.png">
mmfei commented 2 years ago

swoole 4.8.9 也不行 yasd 0.3.9 也不行

J0hnnyw commented 2 years ago

php 8.1.7 swoole 4.8.10 yasd v0.3.9-alpha 也是不行

huanghantao commented 1 year ago

可以考虑使用 swoole-src的 xdebug分支,https://github.com/swoole/swoole-src/tree/support-xdebug 可以直接使用xdebug进行调试,前提是PHP版本要大于等于8.1

mmfei commented 1 year ago

可以考虑使用 swoole-src的 xdebug分支,https://github.com/swoole/swoole-src/tree/support-xdebug 可以直接使用xdebug进行调试,前提是PHP版本要大于等于8.1

没有这个分支......

huanghantao commented 1 year ago

可以考虑使用 swoole-src的 xdebug分支,https://github.com/swoole/swoole-src/tree/support-xdebug 可以直接使用xdebug进行调试,前提是PHP版本要大于等于8.1

没有这个分支......

已经合并到了master分支