Skip to content

Commit

Permalink
Update README (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
sy-records authored Dec 17, 2020
1 parent 1e8f1f8 commit 5c68b6d
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 23 deletions.
53 changes: 34 additions & 19 deletions README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@

### 安装

你需要先安装`boost`.
你需要先安装`boost`

macos:
macOS:

```bash
brew install boost
```

ubuntu:
Ubuntu:

```bash
apt-get install libboost-all-dev
```

centos:
CentOS:

```bash
yum install boost boost-devel
Expand All @@ -40,7 +40,7 @@ make install
设置 php.ini 文件:

```ini
zend_extension=yasd.so
zend_extension=yasd
```

查看扩展信息:
Expand All @@ -49,11 +49,26 @@ zend_extension=yasd.so
php --ri yasd
```

### IDE 模式调试

```ini
zend_extension=yasd
yasd.debug_mode=remote
yasd.remote_host=127.0.0.1
yasd.remote_port=9000
```
### cmd 模式调试

```ini
zend_extension=yasd
yasd.debug_mode=cmd
```

所有命令都支持优先级模糊匹配。

`li``lis``list`都等于`l`,查看源码

### 开始调试 run
### 开始调试

```bash
php -e test.php
Expand All @@ -65,7 +80,7 @@ php -e test.php
l
```

### 设置断点
#### 设置断点

```bash
b 文件的绝对路径 需要断点的行号
Expand All @@ -81,15 +96,15 @@ yasd.breakpoints_file=yasd.log

如果缓存文件存在,当启动调试时,文件中的断点信息会被自动加载;

### 删除断点 delete
#### 删除断点 delete

```bash
d 文件的绝对路径 断点所在的行号
```

如果设置或者删除断点时,不指定文件绝对路径,默认是当前停留的文件。

### 监视点 watch
#### 监视点 watch

我们可以监控变量变化或条件,例如:

Expand All @@ -105,59 +120,59 @@ watch a > 10
watch name == swoole
```

### 运行 run
#### 运行 run

```bash
r
```

### 下一步 step over
#### 下一步 step over

```bash
n
```

遇到函数的时候,不会进入函数内部

### 下一步 step into
#### 下一步 step into

```bash
s
```

遇到函数的时候,会进入函数内部

### 跳出当前函数 finish
#### 跳出当前函数 finish

```bash
f
```

### 查看调用栈
#### 查看调用栈

```bash
bt
```

### 查看所有断点信息 info
#### 查看所有断点信息 info

```bash
i
```

### 继续运行 continue
#### 继续运行 continue

```bash
c
```

### 退出 quit
#### 退出 quit

```bash
q
```

### 打印变量 print
#### 打印变量 print

```bash
p
Expand All @@ -171,7 +186,7 @@ p this
p this->prop
```

### 查看当前所在的协程 level
#### 查看当前所在的协程 level

```bash
le
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ Yet Another Swoole Debugger.

You'll need to install the Boost library first.

macos:
macOS:

```bash
brew install boost
```

ubuntu:
Ubuntu:

```bash
apt-get install libboost-all-dev
```

centos:
CentOS:

```bash
yum install boost boost-devel
Expand All @@ -40,7 +40,7 @@ make install
set the ini file:

```ini
zend_extension=yasd.so
zend_extension=yasd
```

see the extension info:
Expand Down

0 comments on commit 5c68b6d

Please sign in to comment.