解决方案 »

  1.   

    但是从浏览器运行html,点击发表按钮来submit,不会触发php文件里面的断点。上面这是因为 要想执行断点,必须有个参数。来告诉 apache来执行某个debug工具。比如 参数如下:
    debug_host=192.168.1.100%2C127.0.0.1&debug_fastfile=1&start_debug=1&debug_port=10137&use_remote=1&original_url=http%3A%2F%2Flocalhost%2FgenCode%2Fgen_code.php&send_sess_end=1&debug_stop=1&debug_start_session=1&debug_no_cache=1426345786954&debug_session_id=1000 
     
    用xdebug高度时参数更少。更容易。无论你用什么工具,都得通过参数告诉apache来调用你的debug工具。
      

  2.   

    你这种情况不要用断点。应该在需要设断点的地方,进行一个写log操作。把某些变量的值写入到文件。
    例如:
    file_put_contents('debug.log', '11111', true);当运行后,查看debug.log看看是否有问题。