简体   繁体   English

在MacOS High Sierra上安装xdebug

[英]Install xdebug on MacOS High Sierra

I try to install xdebug with php 7.2 on my mac and I just can't get it installed. 我尝试在Mac上用php 7.2安装xdebug,但无法安装。 I have followed several guides and nothing worked. 我遵循了一些指南,但没有任何效果。

Things I have tried: 我尝试过的事情:

The main errors I get come in the make -step (when run manually as well as when run by pecl). 我得到的主要错误出现在make -step(手动运行以及由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

Then I looked into having a docker instance of xdebug running, but I don't have enough experience with docker. 然后,我研究了运行xdebug的docker实例,但是我对docker的经验不足。

This is bothering me for weeks now, I can't see it anymore - please help :) 这困扰了我几个星期,我再也看不到了-请帮助:)

I have been struggling with installing xdebug for use with XAMPP and I have seen this type of output in one of my earlier tries. 我一直在努力安装用于XAMPP的xdebug,并且在我的早期尝试中已经看到了这种类型的输出。 I don't know if this applies, but I thought I'd add in my two cents. 我不知道这是否适用,但我想我要加两分钱。

From the error outputs, it looks like you unpacked the xdebug in the downloads folder. 从错误输出中,您似乎已经将xdebug解压缩到了downloads文件夹中。 The xdebug wizard instructions say to unpack it in the /Applications/XAMPP/xamppfiles/ folder. xdebug向导说明指示将其解压缩到/ Applications / XAMPP / xamppfiles /文件夹中。 This helps a little because you should be running the phpize, ./configure, etc... from the /Applications/XAMPP/xamppfiles/xdebug-2.6.1/ folder. 这会有所帮助,因为您应该从/Applications/XAMPP/xamppfiles/xdebug-2.6.1/文件夹运行phpize,。/ configure等。

One other thing I had to do to get the ./configure to work was to place the /Applications/XAMPP/xamppfiles/bin in the path BEFORE everything else so that the correct phpize command is called. 为了使./configure正常工作,我要做的另一件事是将/ Applications / XAMPP / xamppfiles / bin放在其他所有路径之前,以便调用正确的phpize命令。 After that, the ./configure ran (I think) without any problems. 之后,。/ configure运行(我认为)没有任何问题。 I am however, stuck at the "make" instruction from the wizard. 但是,我被向导的“ make”指令所困扰。 In fact, I'm composing a question now to that issue when I came across your post. 实际上,当我遇到您的帖子时,我正在对该问题提出一个问题。 Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM