php - 无法运行 phpxdebug
问题描述
我无法让 PHP X Debug 工作。它不会让我选择任何断点,当我转到 localhost:9000 或 8080 时它不会加载。我无法让 PHP X Debug 工作。它不会让我选择任何断点,当我转到 localhost:9000 或 8080 时它不会加载。我无法让 PHP X Debug 工作。它不会让我选择任何断点,当我转到 localhost:9000 或 8080 时它不会加载。我无法让 PHP X Debug 工作。它不会让我选择任何断点,当我转到 localhost:9000 或 8080 时它不会加载。我无法让 PHP X Debug 工作。它不会让我选择任何断点,当我转到 localhost:9000 或 8080 时它不会加载。phpinfo():
phpinfo()
PHP Version => 8.0.0
System => Windows NT DESKTOP-1GCBMNO 10.0 build 19041 (Windows 10) AMD64
Build Date => Nov 24 2020 21:54:22
Build System => Microsoft Windows Server 2016 Standard [10.0.14393]
Compiler => Visual C++ 2019
Architecture => x64
Configure Command => cscript /nologo /e:jscript configure.js "--enable-snapshot-build" "--enable-debug-pack" "--with-pdo-oci=c:\php-snap-build\dep-aux\oracle\x64\instantclient_12_1\sdk,shared" "--with-oci8-12c=c:\php-snap-build\dep-aux\oracle\x64\instantclient_12_1\sdk,shared" "--enable-object-out-dir=../obj/" "--enable-com-dotnet=shared" "--without-analyzer" "--with-pgo"
Server API => Command Line Interface
Virtual Directory Support => enabled
Configuration File (php.ini) Path =>
Loaded Configuration File => D:\xampp\php\php.ini
Scan this dir for additional .ini files => (none)
Additional .ini files parsed => (none)
PHP API => 20200930
PHP Extension => 20200930
Zend Extension => 420200930
Zend Extension Build => API420200930,TS,VS16
PHP Extension Build => API20200930,TS,VS16
Debug Build => no
Thread Safety => enabled
Thread API => Windows Threads
Zend Signal Handling => disabled
Zend Memory Manager => enabled
Zend Multibyte Support => provided by mbstring
IPv6 Support => enabled
DTrace Support => disabled
Registered PHP Streams => php, file, glob, data, http, ftp, zip, compress.zlib, compress.bzip2, https, ftps, phar
Registered Stream Socket Transports => tcp, udp, ssl, tls, tlsv1.0, tlsv1.1, tlsv1.2, tlsv1.3
Registered Stream Filters => convert.iconv.*, string.rot13, string.toupper, string.tolower, convert.*, consumed, dechunk, zlib.*, bzip2.*
This program makes use of the Zend Scripting Language Engine:
Zend Engine v4.0.0-dev, Copyright (c) Zend Technologies
with Xdebug v3.0.1, Copyright (c) 2002-2020, by Derick Rethans
_______________________________________________________________________
Configuration
bcmath
BCMath support => enabled
Directive => Local Value => Master Value
bcmath.scale => 0 => 0
bz2
BZip2 Support => Enabled
Stream Wrapper support => compress.bzip2://
Stream Filter support => bzip2.decompress, bzip2.compress
BZip2 Version => 1.0.8, 13-Jul-2019
calendar
Calendar support => enabled
Core
PHP Version => 8.0.0
Directive => Local Value => Master Value
allow_url_fopen => On => On
allow_url_include => Off => Off
arg_separator.input => & => &
arg_separator.output => & => &
auto_append_file => no value => no value
auto_globals_jit => On => On
auto_prepend_file => no value => no value
browscap => D:\xampp\php\extras\browscap.ini => D:\xampp\php\extras\browscap.ini
default_charset => UTF-8 => UTF-8
default_mimetype => text/html => text/html
disable_classes => no value => no value
disable_functions => no value => no value
display_errors => STDOUT => STDOUT
display_startup_errors => On => On
doc_root => no value => no value
docref_ext => no value => no value
docref_root => no value => no value
enable_dl => Off => Off
enable_post_data_reading => On => On
error_append_string => no value => no value
error_log => D:\xampp\php\logs\php_error_log => D:\xampp\php\logs\php_error_log
error_prepend_string => no value => no value
error_reporting => 22527 => 22527
expose_php => On => On
extension_dir => D:\xampp\php\ext => D:\xampp\php\ext
file_uploads => On => On
hard_timeout => 2 => 2
highlight.comment => <font style="color: #FF8000">#FF8000</font> => <font style="color: #FF8000">#FF8000</font>
highlight.default => <font style="color: #0000BB">#0000BB</font> => <font style="color: #0000BB">#0000BB</font>
highlight.html => <font style="color: #000000">#000000</font> => <font style="color: #000000">#000000</font>
highlight.keyword => <font style="color: #007700">#007700</font> => <font style="color: #007700">#007700</font>
highlight.string => <font style="color: #DD0000">#DD0000</font> => <font style="color: #DD0000">#DD0000</font>
html_errors => Off => Off
ignore_repeated_errors => Off => Off
ignore_repeated_source => Off => Off
ignore_user_abort => Off => Off
implicit_flush => On => On
include_path => D:\xampp\php\PEAR => D:\xampp\php\PEAR
input_encoding => no value => no value
internal_encoding => no value => no value
log_errors => On => On
log_errors_max_len => 1024 => 1024
mail.add_x_header => Off => Off
mail.force_extra_parameters => no value => no value
mail.log => no value => no value
max_execution_time => 0 => 0
max_file_uploads => 20 => 20
max_input_nesting_level => 64 => 64
max_input_time => -1 => -1
max_input_vars => 1000 => 1000
memory_limit => 512M => 512M
open_basedir => no value => no value
output_buffering => 0 => 0
output_encoding => no value => no value
output_handler => no value => no value
post_max_size => 40M => 40M
precision => 14 => 14
realpath_cache_size => 4096K => 4096K
realpath_cache_ttl => 120 => 120
register_argc_argv => On => On
report_memleaks => On => On
report_zend_debug => Off => Off
request_order => GP => GP
sendmail_from => no value => no value
sendmail_path => no value => no value
serialize_precision => -1 => -1
short_open_tag => Off => Off
SMTP => localhost => localhost
smtp_port => 25 => 25
sys_temp_dir => no value => no value
syslog.facility => LOG_USER => LOG_USER
syslog.filter => no-ctrl => no-ctrl
syslog.ident => php => php
unserialize_callback_func => no value => no value
upload_max_filesize => 40M => 40M
upload_tmp_dir => D:\xampp\tmp => D:\xampp\tmp
user_dir => no value => no value
user_ini.cache_ttl => 300 => 300
user_ini.filename => .user.ini => .user.ini
variables_order => GPCS => GPCS
windows.show_crt_warning => Off => Off
xmlrpc_error_number => 0 => 0
xmlrpc_errors => Off => Off
zend.assertions => 1 => 1
zend.detect_unicode => On => On
zend.enable_gc => On => On
zend.exception_ignore_args => Off => Off
zend.exception_string_param_max_len => 15 => 15
zend.multibyte => Off => Off
zend.script_encoding => no value => no value
ctype
ctype functions => enabled
curl
cURL support => enabled
cURL Information => 7.73.0
Age => 7
Features
AsynchDNS => Yes
CharConv => No
Debug => No
GSS-Negotiate => No
IDN => Yes
IPv6 => Yes
krb4 => No
Largefile => Yes
libz => Yes
NTLM => Yes
NTLMWB => No
SPNEGO => Yes
SSL => Yes
SSPI => Yes
TLS-SRP => No
HTTP2 => Yes
GSSAPI => No
KERBEROS5 => Yes
UNIX_SOCKETS => Yes
PSL => No
HTTPS_PROXY => Yes
MULTI_SSL => No
BROTLI => No
Protocols => dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, ldaps, mqtt, pop3, pop3s, rtsp, scp, sftp, smb, smbs, smtp, smtps, telnet, tftp
Host => x86_64-pc-win32
SSL Version => OpenSSL/1.1.1h
ZLib Version => 1.2.11
libSSH Version => libssh2/1.9.0
Directive => Local Value => Master Value
curl.cainfo => D:\xampp\apache\bin\curl-ca-bundle.crt => D:\xampp\apache\bin\curl-ca-bundle.crt
date
date/time support => enabled
timelib version => 2020.02
"Olson" Timezone Database Version => 2020.4
Timezone Database => internal
Default timezone => Europe/Berlin
Directive => Local Value => Master Value
date.default_latitude => 31.7667 => 31.7667
date.default_longitude => 35.2333 => 35.2333
date.sunrise_zenith => 90.833333 => 90.833333
date.sunset_zenith => 90.833333 => 90.833333
date.timezone => Europe/Berlin => Europe/Berlin
dom
DOM/XML => enabled
DOM/XML API Version => 20031129
libxml Version => 2.9.10
HTML Support => enabled
XPath Support => enabled
XPointer Support => enabled
Schema Support => enabled
RelaxNG Support => enabled
exif
EXIF Support => enabled
Supported EXIF Version => 0220
Supported filetypes => JPEG, TIFF
Multibyte decoding support using mbstring => enabled
Extended EXIF tag formats => Canon, Casio, Fujifilm, Nikon, Olympus, Samsung, Panasonic, DJI, Sony, Pentax, Minolta, Sigma, Foveon, Kyocera, Ricoh, AGFA, Epson
Directive => Local Value => Master Value
exif.decode_jis_intel => JIS => JIS
exif.decode_jis_motorola => JIS => JIS
exif.decode_unicode_intel => UCS-2LE => UCS-2LE
exif.decode_unicode_motorola => UCS-2BE => UCS-2BE
exif.encode_jis => no value => no value
exif.encode_unicode => ISO-8859-15 => ISO-8859-15
fileinfo
fileinfo support => enabled
libmagic => 539
filter
Input Validation and Filtering => enabled
Directive => Local Value => Master Value
filter.default => unsafe_raw => unsafe_raw
filter.default_flags => no value => no value
ftp
FTP support => enabled
FTPS support => enabled
gettext
解决方案
我已完成以下步骤:
Install XDebug I highly recommend you make a simple test.php file, put a phpinfo(); statement in there, then copy the output and paste it into the XDebug installation wizard. It will analyze it and give you tailored installation instructions for your environment. In short:
On Windows: Download the appropiate precompiled DLL for your PHP version, architecture (64/32 Bit), thread safety (TS/NTS) and Visual Studio compiler version and place it in your PHP extension folder.
On Linux: Either download the source code as a tarball or clone it with git, then compile it.
Configure PHP to use XDebug by adding zend_extension=path/to/xdebug to your php.ini. The path of your php.ini is shown in your phpinfo() output under "Loaded Configuration File".
Enable remote debugging in your php.ini:
[XDebug]
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
There are other ways to tell XDebug to connect to a remote debugger than remote_autostart, like cookies, query parameters or browser extensions. I recommend remote_autostart because it "just works". There are also a variety of other options, like the port (by default 9000), please see the XDebug documentation on remote debugging for more information.
If you are doing web development, don't forget to restart your webserver to reload the settings.
Verify your installation by checking your phpinfo() output for an XDebug section.
这是总结哦phpinfo():
总结 Xdebug 已安装:3.0.1 服务器 API:命令行界面 Windows:是编译器:MS VS16 架构:x64 Zend 服务器:无 PHP 版本:8.0.0 Zend API nr:420200930 PHP API nr:20200930 调试构建:无线程安全构建:是 OPcache 已加载:否 扩展目录:D:\xampp\php\ext
推荐阅读
- android - 如何使用 Material Design 主题创建圆形按钮、更改其颜色并为其设置动画?
- sqlite - 如何使用 vscode 将 csv 文件导入 sqlite?
- java - 使用 ByteArray 请求 MultiPart/Form-Data
- node.js - Nodejs Mongoose - 检查数组对象值是否存在,如果不存在则将新对象添加到数组中
- android - 如何在android studio中读取输出张量(tflite)
- r - 如何使用 R 中的某些公式将季度数据分解为月度数据?
- python - 根据值对列表进行排序,如果相同的值使用索引对其进行排序
- c++ - volatile 和 mutex 是否确保 C++ 中的内存排序?
- java - “选择新构造函数”查询返回 java.lang.Object 而不是构造函数类的实例
- ruby - 奥丁计划:关于棋盘颜色的问题