zoukankan      html  css  js  c++  java
  • paip.php的调试attilax总结


    paip.php的调试--attilax总结

    php的调试可用PDT与XDEBUGGER,或者与zend debugger来。。如果是php WEB项目,只能

    进行远程调试,XDEBUGGER/zend debugge 加载起来后,把PHP的信息截获,然后连接PDT的

    9000/10000端口,把内部信息发往ECLIPSE PDT了。。

    ---------1.使用xdebugger------------
    a.在PHP。INI配置xdebugger,然后PHPINFO()测试,确定可以看到XDEBUGGER的配置。

    。将其REMOTE配置全部打开..

    b.设定multisession,这点很重要::: 在eclipse中的PDT插件,window>设定》PHP》DEBUG,

    打开PHP DEBUG设置页, php debugger选择XDEBUG,然后configure》installed

    debuggers>xdebugger>configure >xdebug/dbgp setting ,  一定要选定“use

    multisession" ,这点很重要。默认端口9000一般不要改..

    c.配置项目调试起动页:::然后在ECLIPSE图标栏,点DEBUG图标,open debug dialog> php

    web page>配置为XDEBUG调试。。

    d.进行调试。。在WEB开发中,只能进行远程调试。。本地调试仅仅对本地化PHP脚本而言。。

    PDT不支持,直接在浏览器里输入URL,然后打断点,这样子是无法停止下来的,无法断点调试。。

    这点和JAVA的远程调试不同..

    e.只能用PDT打开调试IE窗口,可以看到MS  http://localhost/t2.php?

    XDEBUG_SESSION_START=ECLIPSE_DBGP&KEY=13418867522671   ,有

    XDEBUG_SESSION_START参数等...然后你再设置断点,再打入或者跳转到要测试的URL...


    f.注意:::multisession设置非常重要,否则,你只能命中断点一次,就停止调试了。。设置了

    multisession后,每次打开调试的PHP页面,,都会命中断点的.就和JAVA的远程调试差不多了...

    ---------------2.配置zend debugger进行远程调试----------

    a.配置::
    a.1. Add the following line to your php.ini file:
       Linux and Mac OS X:      zend_extension=<full_path_to_ZendDebugger.so>
       Windows:                 zend_extension_ts=<full_path_to_ZendDebugger.dll>
       Windows non-thread safe: zend_extension=<full_path_to_ZendDebugger.dll>
      
    a.2. Add the following lines to your php.ini file:
       zend_debugger.allow_hosts=<host_ip_addresses>
       zend_debugger.expose_remotely=always

       (*) hopst_ip_addresses are the IPs of the hosts which will be allowed to initiate

    debug sessions

    a.3. Copy the dummy.php file to your document root directory.

    a.4. Restart your Web server.


    b.在eclipse中的PDT插件,设置为zend debugger。

    c.c.配置项目调试起动页::

    d.d.进行调试。。也是需要要PDT打开调试窗口,不能直接窗口调试..URL ms:
    http://localhost/t2.php?

    debug_session_id=1000&start_debug=1&debug_start_session=1&debug_host=192.1

    68.1.188%2C127.0.0.1&debug_no_cache=1341887571398&debug_port=10000&send

    _sess_end=1&original_url=http://localhost/t2.php&debug_stop=1
    它会把PDT使用的连接端口发往zend debugger...

  • 相关阅读:
    python学习之strip()
    python学习之find()
    Linux scp命令
    TensorFlow学习笔记4——变量共享
    TensorFlow学习笔记 速记1——tf.nn.dropout
    TensorFlow学习笔记 补充2—— 生成特殊张量
    sublime test3 安装及配置
    TensorFlow学习笔记3——Placeholders and feed_dict
    TensorFlow学习笔记 补充1——InteractiveSession
    TensorFlow学习笔记2——数据类型及简单运算
  • 原文地址:https://www.cnblogs.com/attilax/p/15199977.html
Copyright © 2011-2022 走看看