如何使用SublimeText3配置 PHP IDE环境
首先是安装好PHP之后配置环境变量
https://zsrimg.ikafan.com/file_images/article/202104/2021421110105902.jpg?202132111114
https://zsrimg.ikafan.com/file_images/article/202104/2021421110137234.jpg?202132111144
然后在cmd中输入php -v 能看到版本号即为配置好了

https://zsrimg.ikafan.com/file_images/article/202104/2021421110205469.jpg?202132111213
之后在sublime中新建编译系统,输入代码
{

  1. "cmd": ["php", "$file"],
  2. "file_regex": "^(...*?):([0-9]*):?([0-9]*)",
  3. "selector": "source.php"
  4. }

然后保存在默认位置,改名字为php.sublime-build 然后就好了,输入简单的php语句按Ctrl+B就能看见结果了。

之后进行Xdebug的安装
我们先去查看php.ini的内容新建一个php文件只写一个phpinfo()函数
<?php
phpinfo();
?>
然后用浏览器运行(wampserver要放到www里面用localhost/…去访问)然后可以看到
https://zsrimg.ikafan.com/file_images/article/202104/2021421110316243.jpg?202132111323
然后右键查看源码,然后将所有代码复制到这里https://xdebug.org/wizard.php去分析php所对应的xdebug版本
https://zsrimg.ikafan.com/file_images/article/202104/2021421110346758.jpg?202132111355
最下面会让你下载对应的版本以及需要将其放到哪里,修改什么内容,如果是使用wampserver的可以点左下角的图标,php里面的php.ini打开进行修改,由于wampserver里面本身会有一些xdebug的配置,我们可以注释掉,最终的配置如下:
[xdebug]
zend_extension = E:\wamp64\bin\php\php5.6.19\ext\php_xdebug-2.4.0-5.6-vc11-x86_64.dll
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
;xdebug.remote_enable = off
;xdebug.profiler_enable = off
;xdebug.profiler_enable_trigger = off
;xdebug.profiler_output_name = cachegrind.out.%t.%p
;xdebug.profiler_output_dir =”E:/wamp64/tmp”
;xdebug.show_local_vars=0
之后重启所有服务器之后,在sublime中用package conctrol下载xdebug client 然后就可以调试了

Shift+f8: 打开调试面板
f8:打开调试面板快速连接
Ctrl+f8: 切换断点
Ctrl+Shift+f5: 运行到下一个断点
Ctrl+Shift+f6: 单步
Ctrl+Shift+f7: 步入
Ctrl+Shift+f8: 步出
chrome 上可以安一个xdebug helper这样就能在网页上进行调试了

更多相关文章

  1. ADB连接Android设备的三种方法
  2. Android(安卓)Studio无法真机调试
  3. 【Android(安卓)开发入门】Android设备监视器之调试工具DDMS使用
  4. Android调试工具之Traceview
  5. Android开发和调试
  6. android通过USB使用真机调试程序
  7. android 图片解码显示流程
  8. Android桌面小部件AppWidget(1)
  9. 使用GDB调试Android(安卓)NDK native(C/C++)程序

随机推荐

  1. Android EditText取消自动焦点获取
  2. 【Android】Android Layout Binder——根
  3. android 绘图
  4. PreferenceActivity、PreferenceFragment
  5. Python on Android
  6. Android关闭多个activity
  7. Android中文API —— VideoView
  8. android studio 3.1 Android Device Moni
  9. JS调用Java代码(Android)
  10. Android 上架应用市场整理