MantisBT - Xdebug
View Issue Details
0001600XdebugRemote Debuggingpublic2018-12-21 09:442018-12-27 18:45
Mac OS
0001600: Crashes while trying to debug laravel 5.7 app
/usr/local/bin/php -S localhost:8000 -t public -d zend_extension=/usr/local/Cellar/php/7.3.0/pecl/20180731/

Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
place breakpoint in controller method
start php dev server
server crushes
No tags attached.
Issue History
2018-12-21 09:44vmorozovNew Issue
2018-12-23 21:08derickNote Added: 0004778
2018-12-23 21:08derickAssigned To => derick
2018-12-23 21:08derickStatusnew => feedback
2018-12-26 08:14vmorozovNote Added: 0004784
2018-12-26 08:14vmorozovStatusfeedback => assigned
2018-12-27 18:45derickNote Added: 0004788
2018-12-27 18:45derickStatusassigned => feedback

2018-12-23 21:08   
Can you run the following on the shell:

gdb --args /usr/local/bin/php -S localhost:8000 -t public -d zend_extension=/usr/local/Cellar/php/7.3.0/pecl/20180731/

Then on the (gdb) prompt type "run". Then request a web site on localhost:8000. When there is a crash in GDB (it should say segmentation fault), type "bt full", and attach that file.
2018-12-26 08:14   
This is the command output. I think it didn`t work properly.

gdb --args /usr/local/bin/php -S localhost:8000 -t public -d zend_extension=/usr/local/Cellar/php/7.3.0/pecl/20180731/

GNU gdb (GDB) 8.2.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <> [^]
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin18.2.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<>. [^]
Find the GDB manual and other documentation resources online at:
    <>. [^]

For help, type "help".
--Type <RET> for more, q to quit, c to continue without paging--
Type "apropos word" to search for commands related to "word"...
BFD: /usr/local/Cellar/php/7.3.0/bin/php: unknown load command 0x32
BFD: /usr/local/Cellar/php/7.3.0/bin/php: unknown load command 0x32
"/usr/local/bin/php": not in executable format: file format not recognized
(gdb) run
Starting program: -S localhost:8000 -t public -d zend_extension=/usr/local/Cellar/php/7.3.0/pecl/20180731/
No executable file specified.
Use the "file" or "exec-file" command.
(gdb) bt full
No stack.
2018-12-27 18:45   
GDB doesn't seem to understand your binary. It seems to be related to some changes in OSX, so I'm not sure what I can do about that :-/

From what I googled, it's because it's not "codesigned" or whatever that is. There are instructions at [^] on how to fix that.