php.ini配置
[Xdebug_vim]
zend_extension_ts="c:\php\ext\php_xdebug-2.1.0-5.2-vc6.dll"
xdebug.remote_enable = 1
xdebug.remote_port = 9000
xdebug.remote_host = localhost
xdebug.trace_output_dir="E:\xdebug"
xdebug.profiler_output_dir="E:\xdebug"
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_autostart=off
下载安装Dbgp
下载安装python,7.3对应的是python2.7
调试方式:
1、用浏览器打开你要调试的页面文件,并在url尾部加上如下形式: http://localhost/blog/index.php?XDEBUG_SESSION_START=1
2、用vim打开此文件,用可 :Bp 设置断点,然后安 F5 键, 你将会看见
waiting for a new connection on port 9000 for 5 seconds… ,
此时在5秒内刷新刚才那个页面,即可在vim中看到调试界面。
如果出现 <type 'exceptions.AttributeError'>, AttributeError("DbgProtocol instance has no attribute 'stop'", 则说明没有配置成功,要么是 xdebug.remote_* 没有配置好,要么是url尾部上没有加入 ?XDEBUG_SESSION_START=1 ,要么是你没有在5秒内刷新页面 .
" 配置Xdebug,显示内容
let g:debuggerMaxDepth = 5
如果在调试的时候出现乱码问题,在.vimrc中,设置
" 处理文本中显示乱码
set encoding=utf-8
set fileencodings=chinese
set fileencoding=chinese
" 处理菜单及右键菜单乱码
source $vimruntime/delmenu.vim
source $vimruntime/menu.vim
" 处理consle输出乱码
language messages zh_cn.utf-8
[Xdebug_vim]
zend_extension_ts="c:\php\ext\php_xdebug-2.1.0-5.2-vc6.dll"
xdebug.remote_enable = 1
xdebug.remote_port = 9000
xdebug.remote_host = localhost
xdebug.trace_output_dir="E:\xdebug"
xdebug.profiler_output_dir="E:\xdebug"
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_autostart=off
下载安装Dbgp
下载后放入plugins目录中即可,是vim73下面的plugins,不是vimfiles下面的
修改debugger.py文件
node.getAttribute('filename')[7:] 改成 node.getAttribute('filename')[8:]
res.firstChild.getAttribute('fileuri')[7:] 改成 res.firstChild.getAttribute('fileuri')[8:]
'file': s.getAttribute('filename')[7:] 改成 'file': s.getAttribute('filename')[8:],
下载安装python,7.3对应的是python2.7
调试方式:
1、用浏览器打开你要调试的页面文件,并在url尾部加上如下形式: http://localhost/blog/index.php?XDEBUG_SESSION_START=1
2、用vim打开此文件,用可 :Bp 设置断点,然后安 F5 键, 你将会看见
waiting for a new connection on port 9000 for 5 seconds… ,
此时在5秒内刷新刚才那个页面,即可在vim中看到调试界面。
如果出现 <type 'exceptions.AttributeError'>, AttributeError("DbgProtocol instance has no attribute 'stop'", 则说明没有配置成功,要么是 xdebug.remote_* 没有配置好,要么是url尾部上没有加入 ?XDEBUG_SESSION_START=1 ,要么是你没有在5秒内刷新页面 .
" 配置Xdebug,显示内容
let g:debuggerMaxDepth = 5
如果在调试的时候出现乱码问题,在.vimrc中,设置
" 处理文本中显示乱码
set encoding=utf-8
set fileencodings=chinese
set fileencoding=chinese
" 处理菜单及右键菜单乱码
source $vimruntime/delmenu.vim
source $vimruntime/menu.vim
" 处理consle输出乱码
language messages zh_cn.utf-8