Giter Club home page Giter Club logo

Comments (15)

zhaokeli avatar zhaokeli commented on September 25, 2024 3

跟你一样的问题。困扰很久了。各种环境都试了,都会崩掉,:( ,我是phpsotrm+yasd+php8.0
不知道其它用swoole开发项目的人是怎么调试的,难道都是一用yasd的命令行模式一个一个命令打出来的?
还是根本就没用yasd扩展,直接代码里一路的echo var_dump print来调试?

from yasd.

summerKK avatar summerKK commented on September 25, 2024

跟你一样的问题。困扰很久了。各种环境都试了,都会崩掉,:( ,我是phpsotrm+yasd+php8.0 不知道其它用swoole开发项目的人是怎么调试的,难道都是一用yasd的命令行模式一个一个命令打出来的? 还是根本就没用yasd扩展,直接代码里一路的echo var_dump print来调试?

我也是各种都试了,我是php8.1 + swoole5.0 + hyper3.0 没有调试工具写代码太蛋疼了

from yasd.

huanghantao avatar huanghantao commented on September 25, 2024

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

from yasd.

huanghantao avatar huanghantao commented on September 25, 2024

@summerKK 刚好你是php8.1的,你可以试试

from yasd.

summerKK avatar summerKK commented on September 25, 2024

@summerKK 刚好你是php8.1的,你可以试试

大佬,我测试了一下是可以使用的

  • hyperf2 测试的时候会有一个notice 级别的错误 : Using Xdebug in coroutines is extremely dangerous, please notice that it may lead to coredump!

  • hyperf3 测试这个错误是fatal 级别的错误

  • 然后我把swoole 里面那行检测去掉后,重新编译后就可以完美运行了
    image

  • 既然php8.1 以后swoole支持xdebug,这里是不是加个版本判断,大于8.1的,不检测xdebug

  • 我的环境是php8.1 + swoole5.0.1(support-xdebug)

from yasd.

summerKK avatar summerKK commented on September 25, 2024

xdebug是3.1.1

from yasd.

huanghantao avatar huanghantao commented on September 25, 2024

@summerKK 刚好你是php8.1的,你可以试试

大佬,我测试了一下是可以使用的

  • hyperf2 测试的时候会有一个notice 级别的错误 : Using Xdebug in coroutines is extremely dangerous, please notice that it may lead to coredump!
  • hyperf3 测试这个错误是fatal 级别的错误
  • 然后我把swoole 里面那行检测去掉后,重新编译后就可以完美运行了
    image
  • 既然php8.1 以后swoole支持xdebug,这里是不是加个版本判断,大于8.1的,不检测xdebug
  • 我的环境是php8.1 + swoole5.0.1(support-xdebug)

你用的是哪个swoole-src分支,support-xdebug这个分支在php大于等于8.1的情况下是不会抛出这个xdebug告警的

from yasd.

summerKK avatar summerKK commented on September 25, 2024

image
是这个分支

from yasd.

huanghantao avatar huanghantao commented on September 25, 2024

image

在PHP8.1的情况下,才会定义宏SWOOLE_COROUTINE_MOCK_FIBER_CONTEXT

from yasd.

huanghantao avatar huanghantao commented on September 25, 2024

xdebug是3.1.1

xdebug可以考虑用最新的

from yasd.

summerKK avatar summerKK commented on September 25, 2024
image

在PHP8.1的情况下,才会定义宏SWOOLE_COROUTINE_MOCK_FIBER_CONTEXT

是我的问题,拉的代码拉到master了 😂😂😂😂😂😂😂

from yasd.

huanghantao avatar huanghantao commented on September 25, 2024

嗯嗯,master分支的swoole,xdebug调试的时候,调用栈是乱的,而且还可能会发生coredump

from yasd.

zhaokeli avatar zhaokeli commented on September 25, 2024

@huanghantao @summerKK 非常感谢,百忙之中提供这个问题的解决方案, 我也尽快尝试把项目升级到8.1。

from yasd.

summerKK avatar summerKK commented on September 25, 2024

嗯嗯,master分支的swoole,xdebug调试的时候,调用栈是乱的,而且还可能会发生coredump

重新编译后,运行正常
非常感谢
周末愉快~ 😉😉😉😉😉

from yasd.

summerKK avatar summerKK commented on September 25, 2024

@huanghantao @summerKK 非常感谢,百忙之中提供这个问题的解决方案, 我也尽快尝试把项目升级到8.1。

老哥,提不上感谢,我就测试了一下
我写代码重度依赖xdebug,没有这个感觉不会调试了😂😂😂😂😂
升级php版本可以考虑一下 : https://github.com/rectorphp/rector

from yasd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.