Skip to content

Commit 8ab256c

Browse files
committed
docs(main): 更新断点位置计算方案
1 parent a435219 commit 8ab256c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Feature
2121
* ![Debug Preview](doc/xdebug.png)
2222
* Debug调试
2323
* 问题背景:hyperf的AOP会生成编译生成代理文件,如`app/IndexController.php`会生成`./runtime/container/proxy/APP_IndexController.proxy.php`代理文件。当程序启动时,`IndexController.php`变成了模板文件不再参与程序运行,`APP_IndexController.proxy.php`成为了实际上真正运行的文件,所以当debug调试程序时所有的`断点``堆栈列表日志`都追溯到了代理文件内。
24-
* 解决方案:通过对比解析`模板文件``代理文件`的断点所在行与类方法Stmt所在行相差的偏移量,将所有代理文件的`断点`映射到`模板文件`
24+
* 解决方案:定位`模板文件``代理文件`的断点所在行第一个`ast节点`,计算出该节点的树路径相对偏移量,得出对应文件的断点位置
2525
* Lombok支持(Todo):[maliboot/lombok](https://github.com/maliboot/lombok)适配,解决该PHP扩展使用时编辑器没有自动补全、参数提示、错误语法高量、导航等功能
2626

2727
Idea

0 commit comments

Comments
 (0)