All Projects → swoole → Yasd

swoole / Yasd

Licence: apache-2.0
Yet Another Swoole Debugger

Labels

Projects that are alternatives of or similar to Yasd

Mix Phar Skeleton
Phar command line program development skeleton
Stars: ✭ 81 (-36.22%)
Mutual labels:  swoole
Community Chinese
Swoole 提案
Stars: ✭ 101 (-20.47%)
Mutual labels:  swoole
Game Ddz
♦️ 使用Hyperf框架开发斗地主游戏
Stars: ✭ 116 (-8.66%)
Mutual labels:  swoole
Yii2 Swoole
full solutions making yii2-framework run on swoole with coroutine.
Stars: ✭ 86 (-32.28%)
Mutual labels:  swoole
Alphp
A micro PHP Docker environment based on an Alpine image. Can be used for container publishing, the completed image is only 30-40M
Stars: ✭ 100 (-21.26%)
Mutual labels:  swoole
Slightphp
SlightPHP 高效的PHP敏捷开发框架
Stars: ✭ 110 (-13.39%)
Mutual labels:  swoole
Slim Swoole
Convenient library to run SlimPHP applications with Swoole
Stars: ✭ 75 (-40.94%)
Mutual labels:  swoole
Smproxy
Swoole MySQL Proxy 一个基于 MySQL 协议,Swoole 开发的MySQL数据库连接池。 A MySQL database connection pool based on MySQL protocol and Swoole.
Stars: ✭ 1,665 (+1211.02%)
Mutual labels:  swoole
Phero
这个是一个独立的orm组件可以使用在任何系统中,提供灵活的orm操作,注解形式的数据库和类的映射。This is a database query tool library. swoole mysql pool.
Stars: ✭ 100 (-21.26%)
Mutual labels:  swoole
Swoole Tadpole
tadpole chatroom (maybe spermium) powered by swoole and slim framework
Stars: ✭ 116 (-8.66%)
Mutual labels:  swoole
Swoole Source Analysis
swoole source reading 源码分析
Stars: ✭ 88 (-30.71%)
Mutual labels:  swoole
Danmu Demo
php swoole扩展构建的websocket弹幕服务端
Stars: ✭ 99 (-22.05%)
Mutual labels:  swoole
Webrtc
swoole webrtc demo
Stars: ✭ 107 (-15.75%)
Mutual labels:  swoole
Php Arrays In Memory Comparison
How to store 11kk items in memory? Comparison of methods: array vs object vs SplFixedArray vs pack vs swoole_table vs swoole_pack vs redis vs memsql vs node.js arrays in php7
Stars: ✭ 83 (-34.65%)
Mutual labels:  swoole
Php Ext Xlswriter
🚀 PHP Extension for creating and reader XLSX files.
Stars: ✭ 1,734 (+1265.35%)
Mutual labels:  swoole
Ycsocket
基于swoole的socket框架,支持协程版MySQL、Redis连接池,已用于大型RPG游戏服务端
Stars: ✭ 77 (-39.37%)
Mutual labels:  swoole
Linkphp
基于swoole一款高性能多进程常驻内存型全栈框架,内置WebSocket服务器、服务治理PhpRpc功能,不依赖传统的 PHP-FPM,可以用于构建高性能的Web系统、API、中间件、基础服务等等。
Stars: ✭ 101 (-20.47%)
Mutual labels:  swoole
Charroom
PHP + Swoole 聊天室
Stars: ✭ 125 (-1.57%)
Mutual labels:  swoole
Group
轻量级框架 。实现了定时任务功能,分布式任务队列,命令行控制台,数据库脚本自动化,单元测试, rpc服务,多进程服务(模拟map-reduce)等等实用的功能!! 文档 https://fucongcong.gitbooks.io/group-doc/content/.
Stars: ✭ 122 (-3.94%)
Mutual labels:  swoole
Dfs
A distributed file server framework based on swoole and inotify
Stars: ✭ 112 (-11.81%)
Mutual labels:  swoole

English | 中文

yasd

Yet Another Swoole Debugger. document

How to use it

build

You'll need to install the Boost library first.

macOS:

brew install boost

Ubuntu:

apt-get install libboost-all-dev

CentOS:

yum install boost boost-devel
phpize --clean && \
phpize && \
./configure && \
make clean && \
make && \
make install

set the ini file:

zend_extension=yasd

see the extension info:

php --ri yasd

IDE debug mode

zend_extension=yasd
yasd.debug_mode=remote
yasd.remote_host=127.0.0.1
yasd.remote_port=9000

cmd debug mode

All command supports fuzzy matching of priorities.

set the ini file:

zend_extension=yasd
yasd.debug_mode=cmd

start debug

php -e test.php

list

l

list source code

breakpoint

b absolute-file-path lineno

This will also save the breakpoint information in the cache file -- .breakpoints_file.log

You can change this file name by the ini file, e.g.

yasd.breakpoints_file="yasd.log"

If the cache file exists, the breakpoints in the file are automatically loaded when debug is started.

Delete breakpoints

d absolute-file-path lineno

If a breakpoint is set or deleted without specifying absolute-file-path, It will set breakpoint in the current file.

watch point

We can monitor the variable changes or conditions, for example:

watch a
watch a > 10
watch name == swoole

run

r

step over

n

step into

s

step out

f

backtrace

bt

info

show all breakpoints:

i

continue

c

quit

q

print

p

variable name do not need to have $, for example:

p a
p this
p this->prop

level

le

Q&A

Debugging with phpstorm (remote mode)

  • the port phpstorm listens on should be the one used for xdebug, also make sure remote connections are allowed: image

  • do NOT forget to use -e option when running scripts, debugging will not work otherwise

  • ensure that phpstorm listens on incoming connections:

image

Slow Start Framework

When using yasd, if the framework starts slowly (most of the time it's because the framework is scanning a lot of files), you can execute the following command.

Hyperf
composer dump-autoload -o

Then modify the following configuration config/config.php:

'scan_cacheable' => env('SCAN_CACHEABLE', true)
Imi

We did not find a slow start problem.

EasySwoole

We did not find a slow start problem.

MixPHP

We did not find a slow start problem.

Swoft

We did not find a slow start problem.

One

We did not find a slow start problem.

The breakpoint is not triggered

  1. No absolute path to the file is used
  2. The breakpoint is not a valid line, such as a function declaration, blank line, etc
  3. The code is generated with proxy classes, such as Hyperf. So you need to set breakpoints in the proxy class.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].