在MacOS High Sierra上安装xdebug

时间:2018-06-26 14:46:12

标签: php xampp xdebug

我尝试在Mac上使用php 7.2安装xdebug,但无法安装。我遵循了一些指南,但没有任何效果。

我尝试过的事情:

我得到的主要错误来自make步骤(手动运行以及由pecl运行时)。

    /bin/sh /Users/my_name/Downloads/xdebug-2.6.0/xdebug-2.6.0/libtool --mode=compile cc   -I. -I/Users/my_name/Downloads/xdebug-2.6.0/xdebug-2.6.0 -DPHP_ATOM_INC -I/Users/my_name/Downloads/xdebug-2.6.0/xdebug-2.6.0/include -I/Users/my_name/Downloads/xdebug-2.6.0/xdebug-2.6.0/main -I/Users/my_name/Downloads/xdebug-2.6.0/xdebug-2.6.0 -I/Applications/XAMPP/xamppfiles/include/php -I/Applications/XAMPP/xamppfiles/include/php/main -I/Applications/XAMPP/xamppfiles/include/php/TSRM -I/Applications/XAMPP/xamppfiles/include/php/Zend -I/Applications/XAMPP/xamppfiles/include/php/ext -I/Applications/XAMPP/xamppfiles/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /Users/my_name/Downloads/xdebug-2.6.0/xdebug-2.6.0/xdebug.c -o xdebug.lo 
mkdir .libs
 cc -I. -I/Users/my_name/Downloads/xdebug-2.6.0/xdebug-2.6.0 -DPHP_ATOM_INC -I/Users/my_name/Downloads/xdebug-2.6.0/xdebug-2.6.0/include -I/Users/my_name/Downloads/xdebug-2.6.0/xdebug-2.6.0/main -I/Users/my_name/Downloads/xdebug-2.6.0/xdebug-2.6.0 -I/Applications/XAMPP/xamppfiles/include/php -I/Applications/XAMPP/xamppfiles/include/php/main -I/Applications/XAMPP/xamppfiles/include/php/TSRM -I/Applications/XAMPP/xamppfiles/include/php/Zend -I/Applications/XAMPP/xamppfiles/include/php/ext -I/Applications/XAMPP/xamppfiles/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /Users/my_name/Downloads/xdebug-2.6.0/xdebug-2.6.0/xdebug.c  -fno-common -DPIC -o .libs/xdebug.o
In file included from /Users/my_name/Downloads/xdebug-2.6.0/xdebug-2.6.0/xdebug.c:52:
./php_xdebug.h:143:2: error: unknown type name 'zend_long'; did you mean 'zend_ulong'?
        zend_long     max_nesting_level;
        ^~~~~~~~~
        zend_ulong
/Applications/XAMPP/xamppfiles/include/php/Zend/zend_types.h:28:23: note: 'zend_ulong' declared here
typedef unsigned long zend_ulong;
                      ^
In file included from /Users/my_name/Downloads/xdebug-2.6.0/xdebug-2.6.0/xdebug.c:52:
./php_xdebug.h:144:2: error: unknown type name 'zend_long'; did you mean 'zend_ulong'?
        zend_long     max_stack_frames;
        ^~~~~~~~~
        zend_ulong
/Applications/XAMPP/xamppfiles/include/php/Zend/zend_types.h:28:23: note: 'zend_ulong' declared here
typedef unsigned long zend_ulong;
                      ^
In file included from /Users/my_name/Downloads/xdebug-2.6.0/xdebug-2.6.0/xdebug.c:52:
./php_xdebug.h:147:2: error: unknown type name 'zend_long'; did you mean 'zend_ulong'?
        zend_long     collect_params;
        ^~~~~~~~~
        zend_ulong
/Applications/XAMPP/xamppfiles/include/php/Zend/zend_types.h:28:23: note: 'zend_ulong' declared here
typedef unsigned long zend_ulong;
                      ^
In file included from /Users/my_name/Downloads/xdebug-2.6.0/xdebug-2.6.0/xdebug.c:52:
./php_xdebug.h:165:2: error: unknown type name 'zend_long'; did you mean 'zend_ulong'?
        zend_long     force_error_reporting;
        ^~~~~~~~~
        zend_ulong
/Applications/XAMPP/xamppfiles/include/php/Zend/zend_types.h:28:23: note: 'zend_ulong' declared here
typedef unsigned long zend_ulong;
                      ^
In file included from /Users/my_name/Downloads/xdebug-2.6.0/xdebug-2.6.0/xdebug.c:52:
./php_xdebug.h:166:2: error: unknown type name 'zend_long'; did you mean 'zend_ulong'?
        zend_long     halt_level;
        ^~~~~~~~~
        zend_ulong
/Applications/XAMPP/xamppfiles/include/php/Zend/zend_types.h:28:23: note: 'zend_ulong' declared here
typedef unsigned long zend_ulong;
                      ^
In file included from /Users/my_name/Downloads/xdebug-2.6.0/xdebug-2.6.0/xdebug.c:52:
./php_xdebug.h:168:2: error: unknown type name 'zend_long'; did you mean 'zend_ulong'?
        zend_long     overload_var_dump;
        ^~~~~~~~~
        zend_ulong
/Applications/XAMPP/xamppfiles/include/php/Zend/zend_types.h:28:23: note: 'zend_ulong' declared here
typedef unsigned long zend_ulong;
                      ^
In file included from /Users/my_name/Downloads/xdebug-2.6.0/xdebug-2.6.0/xdebug.c:52:
./php_xdebug.h:182:2: error: unknown type name 'zend_long'; did you mean 'zend_ulong'?
        zend_long     trace_options;
        ^~~~~~~~~
        zend_ulong
/Applications/XAMPP/xamppfiles/include/php/Zend/zend_types.h:28:23: note: 'zend_ulong' declared here
typedef unsigned long zend_ulong;
                      ^
In file included from /Users/my_name/Downloads/xdebug-2.6.0/xdebug-2.6.0/xdebug.c:52:
./php_xdebug.h:183:2: error: unknown type name 'zend_long'; did you mean 'zend_ulong'?
        zend_long     trace_format;
        ^~~~~~~~~
        zend_ulong
/Applications/XAMPP/xamppfiles/include/php/Zend/zend_types.h:28:23: note: 'zend_ulong' declared here
typedef unsigned long zend_ulong;
                      ^
In file included from /Users/my_name/Downloads/xdebug-2.6.0/xdebug-2.6.0/xdebug.c:52:
./php_xdebug.h:189:2: error: unknown type name 'zend_long'; did you mean 'zend_ulong'?
        zend_long     display_max_children;
        ^~~~~~~~~
        zend_ulong
/Applications/XAMPP/xamppfiles/include/php/Zend/zend_types.h:28:23: note: 'zend_ulong' declared here
typedef unsigned long zend_ulong;
                      ^
In file included from /Users/my_name/Downloads/xdebug-2.6.0/xdebug-2.6.0/xdebug.c:52:
./php_xdebug.h:190:2: error: unknown type name 'zend_long'; did you mean 'zend_ulong'?
        zend_long     display_max_data;
        ^~~~~~~~~
        zend_ulong
/Applications/XAMPP/xamppfiles/include/php/Zend/zend_types.h:28:23: note: 'zend_ulong' declared here
typedef unsigned long zend_ulong;
                      ^
In file included from /Users/my_name/Downloads/xdebug-2.6.0/xdebug-2.6.0/xdebug.c:52:
./php_xdebug.h:191:2: error: unknown type name 'zend_long'; did you mean 'zend_ulong'?
        zend_long     display_max_depth;
        ^~~~~~~~~
        zend_ulong
/Applications/XAMPP/xamppfiles/include/php/Zend/zend_types.h:28:23: note: 'zend_ulong' declared here
typedef unsigned long zend_ulong;
                      ^
In file included from /Users/my_name/Downloads/xdebug-2.6.0/xdebug-2.6.0/xdebug.c:52:
./php_xdebug.h:246:2: error: unknown type name 'zend_long'; did you mean 'zend_ulong'?
        zend_long     remote_port;    /* 9000 */
        ^~~~~~~~~
        zend_ulong
/Applications/XAMPP/xamppfiles/include/php/Zend/zend_types.h:28:23: note: 'zend_ulong' declared here
typedef unsigned long zend_ulong;
                      ^
In file included from /Users/my_name/Downloads/xdebug-2.6.0/xdebug-2.6.0/xdebug.c:52:
./php_xdebug.h:254:2: error: unknown type name 'zend_long'; did you mean 'zend_ulong'?
        zend_long     remote_cookie_expire_time; /* Expire time for the remote-session cookie */
        ^~~~~~~~~
        zend_ulong
/Applications/XAMPP/xamppfiles/include/php/Zend/zend_types.h:28:23: note: 'zend_ulong' declared here
typedef unsigned long zend_ulong;
                      ^
In file included from /Users/my_name/Downloads/xdebug-2.6.0/xdebug-2.6.0/xdebug.c:52:
./php_xdebug.h:256:2: error: unknown type name 'zend_long'; did you mean 'zend_ulong'?
        zend_long     remote_connect_timeout; /* Timeout in MS for remote connections */
        ^~~~~~~~~
        zend_ulong
/Applications/XAMPP/xamppfiles/include/php/Zend/zend_types.h:28:23: note: 'zend_ulong' declared here
typedef unsigned long zend_ulong;
                      ^
In file included from /Users/my_name/Downloads/xdebug-2.6.0/xdebug-2.6.0/xdebug.c:52:
./php_xdebug.h:313:2: error: unknown type name 'zend_long'; did you mean 'zend_ulong'?
        zend_long     filter_type_tracing;
        ^~~~~~~~~
        zend_ulong
/Applications/XAMPP/xamppfiles/include/php/Zend/zend_types.h:28:23: note: 'zend_ulong' declared here
typedef unsigned long zend_ulong;
                      ^
In file included from /Users/my_name/Downloads/xdebug-2.6.0/xdebug-2.6.0/xdebug.c:52:
./php_xdebug.h:314:2: error: unknown type name 'zend_long'; did you mean 'zend_ulong'?
        zend_long     filter_type_profiler;
        ^~~~~~~~~
        zend_ulong
/Applications/XAMPP/xamppfiles/include/php/Zend/zend_types.h:28:23: note: 'zend_ulong' declared here
typedef unsigned long zend_ulong;
                      ^
In file included from /Users/my_name/Downloads/xdebug-2.6.0/xdebug-2.6.0/xdebug.c:52:
./php_xdebug.h:315:2: error: unknown type name 'zend_long'; did you mean 'zend_ulong'?
        zend_long     filter_type_code_coverage;
        ^~~~~~~~~
        zend_ulong
/Applications/XAMPP/xamppfiles/include/php/Zend/zend_types.h:28:23: note: 'zend_ulong' declared here
typedef unsigned long zend_ulong;
                      ^
In file included from /Users/my_name/Downloads/xdebug-2.6.0/xdebug-2.6.0/xdebug.c:57:
./xdebug_gc_stats.h:23:2: error: unknown type name 'zend_long'; did you mean 'zend_ulong'?
        zend_long    collected;
        ^~~~~~~~~
        zend_ulong
/Applications/XAMPP/xamppfiles/include/php/Zend/zend_types.h:28:23: note: 'zend_ulong' declared here
typedef unsigned long zend_ulong;
                      ^
In file included from /Users/my_name/Downloads/xdebug-2.6.0/xdebug-2.6.0/xdebug.c:57:
./xdebug_gc_stats.h:24:2: error: unknown type name 'zend_long'; did you mean 'zend_ulong'?
        zend_long    duration;
        ^~~~~~~~~
        zend_ulong
/Applications/XAMPP/xamppfiles/include/php/Zend/zend_types.h:28:23: note: 'zend_ulong' declared here
typedef unsigned long zend_ulong;
                      ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [xdebug.lo] Error 1

然后,我研究了运行xdebug的docker实例,但是我对docker的经验不足。

这困扰了我几个星期,我再也看不到了-请帮助:)

1 个答案:

答案 0 :(得分:0)

我一直在努力安装用于XAMPP的xdebug,并且在我的早期尝试之一中已经看到了这种类型的输出。我不知道这是否适用,但我想我要加两分钱。

从错误输出中,您似乎已将xdebug解压缩到了downloads文件夹中。 xdebug向导说明指示将其解压缩到/ Applications / XAMPP / xamppfiles /文件夹中。这会有所帮助,因为您应该从/Applications/XAMPP/xamppfiles/xdebug-2.6.1/文件夹运行phpize,。/ configure等。

要使./configure正常工作,我要做的另一件事是将/ Applications / XAMPP / xamppfiles / bin放在其他所有路径之前,以便调用正确的phpize命令。之后,。/ configure运行(我认为)没有任何问题。但是,我被向导的“ make”指令所困扰。实际上,当我遇到您的帖子时,我正在对该问题提出一个问题。希望这会有所帮助。