使用PHPStorm实现远程调试
来源:互联网 发布:网络连接异常 编辑:程序博客网 时间:2024/05/16 03:59
步骤1:在服务器上安装xdebug,并配置
-> pecl install xdebug
-> 修改php.ini,添加内容
``` shell
zend_extension=xdebug.so
;允许远程调试
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
;如果开启此,将忽略下面的 xdebug.remote_host 的参数。
xdebug.remote_connect_back=1
;(注意这里是,客户端的ip是IDE的机器的ip,不是你的web server的ip)
;xdebug.remote_host = 192.168.33.21
xdebug.remote_port=9001
xdebug.remote_log = "/tmp/xdebug"
;调试器的关键字
xdebug.idekey="PHPSTORM"
;函数跟踪
xdebug.auto_trace = on
xdebug.collect_params=on
xdebug.collect_return=on
xdebug.trace_output_dir = /tmp/xdebug
xdebug.trace_output_name = trace.%c
;瓶颈分析
xdebug.profiler_enable=on
xdebug.profiler_enable_trigger = on
xdebug.profiler_output_dir = /tmp/xdebug
xdebug.profiler_output_name = cachegrind.out.%p
```
步骤2:在preferences/Deployment添加一个server
-> 在Connection项目里填写Sftp host、Port、Root Path等添加信息,添加完了点击Test
SFTP connection
->在Mappings里添加本地文件和远程文件的映射,并填写Web path,填“/”即可
步骤3:修改preferences/Language & Frameworks/PHP里的配置
-> 修改Development environment,修改PHP language level和Interpreter(php可执行文件的二进制路径)
-> 修改Debug子项的配置将xdebug Debug port改为9001
-> 修改Debug子项中DBGP Proxy的配置:IDE Key(例PHPStorm)、Host(远程IP)、Port(xdebug监听端口)
步骤4:在Run/Edit configurations导入部署的server
添加“+”号时选择PHP Web Application
步骤5:开始调试
点击Run/Debug
-> pecl install xdebug
-> 修改php.ini,添加内容
``` shell
zend_extension=xdebug.so
;允许远程调试
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
;如果开启此,将忽略下面的 xdebug.remote_host 的参数。
xdebug.remote_connect_back=1
;(注意这里是,客户端的ip是IDE的机器的ip,不是你的web server的ip)
;xdebug.remote_host = 192.168.33.21
xdebug.remote_port=9001
xdebug.remote_log = "/tmp/xdebug"
;调试器的关键字
xdebug.idekey="PHPSTORM"
;函数跟踪
xdebug.auto_trace = on
xdebug.collect_params=on
xdebug.collect_return=on
xdebug.trace_output_dir = /tmp/xdebug
xdebug.trace_output_name = trace.%c
;瓶颈分析
xdebug.profiler_enable=on
xdebug.profiler_enable_trigger = on
xdebug.profiler_output_dir = /tmp/xdebug
xdebug.profiler_output_name = cachegrind.out.%p
```
步骤2:在preferences/Deployment添加一个server
-> 在Connection项目里填写Sftp host、Port、Root Path等添加信息,添加完了点击Test
SFTP connection
->在Mappings里添加本地文件和远程文件的映射,并填写Web path,填“/”即可
步骤3:修改preferences/Language & Frameworks/PHP里的配置
-> 修改Development environment,修改PHP language level和Interpreter(php可执行文件的二进制路径)
-> 修改Debug子项的配置将xdebug Debug port改为9001
-> 修改Debug子项中DBGP Proxy的配置:IDE Key(例PHPStorm)、Host(远程IP)、Port(xdebug监听端口)
步骤4:在Run/Edit configurations导入部署的server
添加“+”号时选择PHP Web Application
步骤5:开始调试
点击Run/Debug
阅读全文
0 0
- 使用PHPStorm实现远程调试
- 使用Phpstorm实现远程开发
- 使用Phpstorm实现远程开发
- xdebug+phpstorm实现远程断点调试
- phpstorm + xdebug远程调试
- centos下 使用phpstorm+xdebug 远程调试代码
- PhpStorm + Xdebug 远程调试(phpstorm2016)
- 多用户 xdebug 远程调试 PhpStorm
- phpstorm 远程开发及调试
- phpStorm实现断点调试
- 使用WebStorm/Phpstorm实现remote host远程开发
- 使用WebStorm/Phpstorm实现remote host远程开发
- 使用Ide实现远程调试
- 使用 PHPStorm + Xdebug 实现断点调试(二)
- phpstorm + xdebug 远程断点调试,详解。
- phpstorm + xdebug 远程断点调试,详解。
- phpstorm +wampp+Xdebug 远程调试配置
- xdebug 和 phpstorm 远程调试配置
- Eclipse中文版之完美汉化教程(详细图解)
- 学生总结(六)---meclean的作用
- JAVA设计模式之装饰模式(decorator)
- Turtlebot3入门手册之三:PC端软件配置
- PlayFramework安装
- 使用PHPStorm实现远程调试
- position中的sticky
- The study of how to define a function in Python(20170907)
- 欧拉筛
- HDU3401 Trade (动态规划+单调队列)
- ANSYS中表格数组的定义及使用举例
- Lua_表结构_007
- spring DI
- android su 白名单 [续]