即使这会写php也遵守zebra大人的指示:不用print调试!!!!----环境ok  ---gan !!!

w

http://blog.csdn.net/ty_hf/article/details/50768702

https://ubuntuforums.org/showthread.php?t=525257

https://yq.aliyun.com/ziliao/164576

https://php-built.com/2016/01/20/installing-xdebug-for-php7/

php -v

sudo apt-get install php-dev php-pear

sudo pecl install xdebug

Build complete.
Don't forget to run 'make test'.

running: make INSTALL_ROOT="/tmp/pear/temp/pear-build-rootuh4LBI/install-xdebug-2.5.4" install
Installing shared extensions:     /tmp/pear/temp/pear-build-rootuh4LBI/install-xdebug-2.5.4/usr/lib/php/20151012/

+----------------------------------------------------------------------+
  |                                                                      |
  |   INSTALLATION INSTRUCTIONS                                          |
  |   =========================                                          |
  |                                                                      |
  |   See http://xdebug.org/install.php#configure-php for instructions   |
  |   on how to enable Xdebug for PHP.                                   |
  |                                                                      |
  |   Documentation is available online as well:                         |
  |   - A list of all settings:  http://xdebug.org/docs-settings.php     |
  |   - A list of all functions: http://xdebug.org/docs-functions.php    |
  |   - Profiling instructions:  http://xdebug.org/docs-profiling2.php   |
  |   - Remote debugging:        http://xdebug.org/docs-debugger.php     |
  |                                                                      |
  |                                                                      |
  |   NOTE: Please disregard the message                                 |
  |       You should add "extension=xdebug.so" to php.ini                |
  |   that is emitted by the PECL installer. This does not work for      |
  |   Xdebug.                                                            |
  |                                                                      |
  +----------------------------------------------------------------------+

running: find "/tmp/pear/temp/pear-build-rootuh4LBI/install-xdebug-2.5.4" | xargs ls -dils
395602    4 drwxr-xr-x 3 root root    4096 Jun 13 20:14 /tmp/pear/temp/pear-build-rootuh4LBI/install-xdebug-2.5.4
395676    4 drwxr-xr-x 3 root root    4096 Jun 13 20:14 /tmp/pear/temp/pear-build-rootuh4LBI/install-xdebug-2.5.4/usr
395677    4 drwxr-xr-x 3 root root    4096 Jun 13 20:14 /tmp/pear/temp/pear-build-rootuh4LBI/install-xdebug-2.5.4/usr/lib
395678    4 drwxr-xr-x 3 root root    4096 Jun 13 20:14 /tmp/pear/temp/pear-build-rootuh4LBI/install-xdebug-2.5.4/usr/lib/php
395679    4 drwxr-xr-x 2 root root    4096 Jun 13 20:14 /tmp/pear/temp/pear-build-rootuh4LBI/install-xdebug-2.5.4/usr/lib/php/20151012
395675 1444 -rwxr-xr-x 1 root root 1477312 Jun 13 20:14 /tmp/pear/temp/pear-build-rootuh4LBI/install-xdebug-2.5.4/usr/lib/php/20151012/xdebug.so

Build process completed successfully
Installing '/usr/lib/php/20151012/xdebug.so'
install ok: channel://pecl.php.net/xdebug-2.5.4
configuration option "php_ini" is not set to php.ini location
You should add "zend_extension=/usr/lib/php/20151012/xdebug.so" to php.ini
scipy@ubuntu:/$

scipy@ubuntu:/$ sudo find -name php.ini
./etc/php/7.0/cli/php.ini
./etc/php/7.0/apache2/php.ini

scipy@ubuntu:/$ vim  ./etc/php/7.0/apache2/php.ini
scipy@ubuntu:/$ sudo vim  ./etc/php/7.0/apache2/php.ini
scipy@ubuntu:/$ sudo vim ./etc/php/7.0/cli/php.ini

sudo /etc/init.d/apache2 restart

gg:命令将光标移动到文档开头

G:命令将光标移动到文档末尾

scipy@ubuntu:/var$ sudo chown scipy:scipy www -R

xdebug.default_enable = On
xdebug.collect_params = On
; 如果开启此,将忽略下面的 xdebug.remote_host 的参数。 <一台webserver有多个开发者的工作目录的时候使用,如:p1.xx.com,p2.xx.com,p3.xx.com 。。。等。 >
xdebug.remote_connect_back = Off
; 客户端的ip<即IDE的机器的ip,不是你的web server>
xdebug.remote_host = 192.168.95.252
; 客户端的端口<即IDE的机器的ip,不是你的web server>
xdebug.remote_port = 9900
xdebug.remote_enable = On
xdebug.remote_handler = dbgp
xdebug.remote_log = /var/www/data_well_xdebug/xdebug.log
xdebug.remote_req = req
xdebug.auto_trace = Off
xdebug.remote_autostart = On
xdebug.show_exception_trace = 0
xdebug.collect_vars = On
xdebug.collect_return = On
xdebug.collect_params = On
xdebug.var_display_max_depth = 15
xdebug.show_local_vars = 1
xdebug.dump_undefined = 1
xdebug.profiler_enable = 1
xdebug.profiler_output_dir = /var/www/data_well_xdebug

xdebug.idekey = phpstorm_data_well_tmp_php

PHPSTORM 配置:
1.file->setings->php|Debug右侧。xdebug的那一块。
设置Debug port:9900(这里设置 的是,xdebug 吐出的debug信息,通过本机的什么端口传输。)

DBGp IdeKey  phpstorm_data_well_tmp_php
2.file->setings->php|Servers  右侧。 
host: 你的web服务器的域名或ip ,端口,  下面的 use path mapping  意的是,你的项目的目录,对应服务器上的,什么目录?  
这里一定要设置哦! 不然,会发生找不到文件而出错,导至调试终止。
3.Run->Edit Configurations-> 增加一个 PHP WEB APPlication 的调试点。 
右侧: server 选择你上面建立的server.  starturl 设置你的入口文件。
至此,配置完毕!

不用print调试 xdebug ubuntu phpstorm 远程断点调试的更多相关文章

  1. php window系统 xdebug+phpstorm 本地断点调试使用教程

    运行环境: phpStorm 2017.2 PHP 7.1.5 Xdebug 2.6.1 php.ini添加xdebug模块 你需要仔细分析和选择要下载的对应版本,否则无法调试.由于非常容易出错,建议 ...

  2. 本地环境 XAMPP+phpStorm+XDebug+chrome配置和断点调试 注册方法

    我的安装环境:XAMPP版本号V3.1.0 ;phpStorm版本8.0.3;windowsxp 32bit.您老人家先过目一下,不然怕影响意义. XAMPP.phpStorm 都直接安装在了D盘根目 ...

  3. PHpStorm + phpstudy 断点调试配置

    步骤: phpstudy     其他菜单 ->打开配置文件 ->打开 php.ini ->找到 XDebug ->XDebug修改成下面文字 [XDebug] :红色  (1 ...

  4. 史上最佳 Mac+PhpStorm+XAMPP+Xdebug 集成开发和断点调试环境的配置

    在上一篇 PHP 系列的文章<PHP 集成开发环境比较>中,我根据自己的亲身体验,非常简略的介绍和对比了几款常用的集成开发环境,就我个人而言,比较推崇 Zend Studio 和 PhpS ...

  5. [转]史上最佳 Mac+PhpStorm+XAMPP+Xdebug 集成开发和断点调试环境的配置

    本文转自:https://www.cnblogs.com/lishiyun19/p/4470086.html 在上一篇 PHP 系列的文章<PHP 集成开发环境比较>中,我根据自己的亲身体 ...

  6. 本地环境 XAMPP+phpStorm+XDebug+chrome配置和断点调试

    不明白phpStorm+XAMPP+chrome组合的phpStorm配置XDebug的断点调试,很多种网页办法都看过了,可用,但没达预期.QQ群问,一个大牛很奇怪我都配置了怎么还不正确,很干脆地说远 ...

  7. PHP vscode+XDebug 远程断点调试服务器上的代码

    对于简单的项目或仅仅想知道某一位置的某个变量是什么值,直接使用var_dump配置exit来打印和中断就可以了,方便又快捷, 而对于大型项目的调试,或想了解某个系统的整个运行过程,xdebug可能会是 ...

  8. PhpStorm+XAMPP+Xdebug 集成开发和断点调试环境配置

    0x01 Xdebug安装 参考:https://xdebug.org/docs/install cd xdebug-/ phpize sudo ./configure --enable-xdebug ...

  9. PhpStorm本地断点调试

    一.断点调试php环境搭建 1.检测本地php环境是否安装了Xdebug 在本地输出phpinfo():搜索Xdebug;如下图  如果没有安装,安装操作Xdebug如下: 将phpinfo();的信 ...

随机推荐

  1. Netty编码的艺术

    Netty 编码器原理和数据输出: Netty 默认提供了丰富的编解码框架供用户集成使用,我们只对较常用的Java 序列化编码器进行讲解.其它的编码器,实现方式大同小异.其实编码器和解码器比较类似, ...

  2. python中json的基本使用

    一.json的概念 json是一种通用的数据类型 一般情况下接口返回的数据类型都是json 长得像字典,形式也是k-v{ } 其实json是字符串 字符串不能用key.value来取值,所以要先转换为 ...

  3. 错排问题 && 洛谷 P1595 信封问题

    传送门 一道裸的错排问题 错排问题 百度百科上这样说 就是对于一个排列,每一个数都不在正确的位置上的方案数.n 个元素的错排数记为 D(n). 公式 D(n)=(n−1)∗(D(n−2)+D(n−1) ...

  4. IDEA中Java目录结构

    IDEA中Java的目录结构 1.首先新建Project,选择Empty,新建空的项目 2.选择Module时候,需要选择JDK,JDK只需要选择到Java Home目录就可以了 3.创建好Modul ...

  5. SCUT - 153 - 小马哥和他的山脉 - 线段树

    https://scut.online/p/153 其实不需要用线段树,只关心相邻元素的差,像神仙那样用差分就可以O1维护的. 但是我偏要用. 交之前写的那个,注意没有st本身的线段树只有lazy标记 ...

  6. 读取FTP上的excel文件,并写入数据库

    今天遇到一些问题,需要从ftp上读取一些excel文件,并需要将excel中的数据写入到数据库,这样就可以通过管理页面查看这些数据. 我将相关工作分为三步,1.从ftp上读取相关文件,并将excel文 ...

  7. Java架构师需要掌握的技术栈

  8. UNIX网络编程总结一

    客户与服务器通信使用TCP在同一网络通信时,大致按下面的方式通信:client→TCP→IP→以太网驱动程序→以太网→以太网驱动程序→IP→TCP→server.若不在同一网络则需要路由器连接. 客户 ...

  9. 解决nginx proxy_pass反向代理cookie,session丢失的问题

    参考地址:https://www.jianshu.com/p/34abe7eb6f0b 为什么cookie 会丢失? 比如说一个没有经过代理的地址 : http://127.0.0.1/project ...

  10. Integer类的缓存机制

    一.Integer类的缓存机制 我们查看Integer的源码,就会发现里面有个静态内部类. public static Integer valueOf(int i) { assert IntegerC ...