• 宝塔 xdebug idea 调试 php


    安装宝塔

    安装php xdebug插件

     查看是否安装成功  phpinfo

     修改php.ini 配置

    1. [XDebug]
    2. ;xdebug.profiler_append = 0
    3. ;xdebug.profiler_enable = 1
    4. ;xdebug.profiler_enable_trigger = 0
    5. ;xdebug.profiler_output_dir ="D:\BtSoft\temp\xdebug"
    6. ;xdebug.trace_output_dir ="D:\BtSoft\temp\xdebug"
    7. ;xdebug.profiler_output_name = "cache.out.%t-%s"
    8. ;xdebug.remote_enable = 1
    9. ;xdebug.remote_handler = "dbgp"
    10. ;xdebug.remote_host = "127.0.0.1"
    11. ;zend_extension=php_xdebug.dll
    12. zend_extension=php_xdebug.dll
    13. ;用来显示错误信息
    14. display_errors = On
    15. html_errors = On
    16. ;显示堆栈信息
    17. xdebug.show_local_vars = 1
    18. xdebug.max_nesting_level = 50
    19. xdebug.var_display_max_depth = 6
    20. xdebug.dump_once = On
    21. xdebug.dump_globals = On
    22. xdebug.dump_undefined = On
    23. xdebug.dump.REQUEST = *
    24. xdebug.cli_color = 2
    25. ;显示性能信息
    26. xdebug.profiler_enable_trigger = on
    27. xdebug.collect_params = On
    28. xdebug.collect_return = On
    29. xdebug.profiler_enable = On
    30. xdebug.profiler_output_name = cachegrind.out.%t.%p
    31. xdebug.trace_output_dir = "D:\BtSoft\temp\xdebug"
    32. xdebug.profiler_output_dir ="D:\BtSoft\temp\xdebug"
    33. ;远程调试配置信息
    34. ;开启远程调试
    35. xdebug.remote_enable = On
    36. ;远程处理协议
    37. xdebug.remote_handel = dbgp
    38. ;IDE所在机器IP
    39. ;xdebug.remote_host = 127.0.0.1
    40. ;端口号
    41. xdebug.remote_port = 9000
    42. ;IDE KEY
    43. xdebug.idekey = "mykey"
    44. xdebug.remote_connect_back= 1

    重载配置

     安装idea 旗舰版 社区版不能安装php插件

     安装 idea 破解插件

    链接:https://pan.baidu.com/s/1Qlpscprn1O7kuMofSXrrFA 
    提取码:2zhj

    安装idea php插件

    安装谷歌浏览器插件 

    链接:https://pan.baidu.com/s/149NpQl77ezFUPFXL8W2Esw 
    提取码:2nr8

     打开php的页面

     

     填入mykey , 和前面的对应

    新建idea 运行项

     

     

     

     

     开始debug

     

     

     确定断点,去页面刷新页面

     断点已经进来了

    这下一个方法大几百行,就可以调试了

    参考 PHP-PHP和IDEA调试配置_编程秀的博客-CSDN博客_idea 调试php

    实际上只要php.ini中 xdebug.remote_port = 9009  配置的端口,和idea中

     配置的端口一直,就可以调试

  • 相关阅读:
    Redis分布式可重入锁实现方案
    pytest学习和使用6-fixture如何使用?
    信息化发展30
    Android开发之线程间通信
    Java Web 33道面试题汇总
    超标量处理器设计 姚永斌 第3章 虚拟存储器 --3.1~3.2 小节摘录
    主机jvisualvm连接到tomcat服务器查看jvm状态
    Flutter 之 HTTP3/QUIC 和 Cronet 你了解过吗?
    Oracle-后端命令行
    阿里云物联网应用层开发:第二部分,云产品流转
  • 原文地址:https://blog.csdn.net/qq_31683775/article/details/126555384