yasd
yasd copied to clipboard
"php -e" debug with VsCode and Docker Alpine error "Segmentation fault"
- What did you do? If possible, provides a simple script and debug step to reproduce the problem.
-
- Start VsCode debug
-
- Start a script
php -e
- Start a script
-
- Check the variables by VsCode
-
- Sometimes if you click a variable, the debug was stopped and return error "Segmentation fault"
For example, if you click the args variable, it will return "Segmentation fault"
Current File: system/Filters/Filters.php line 163 function $this->initialize(strtolower($uri)); Of CI4 framework v4.2.4

- What is your machine environment used (show your
uname -a&php -v&gcc -v) ?
$ uname -a
Linux 2daa3851c92a 5.10.76-linuxkit #1 SMP Mon Nov 8 10:21:19 UTC 2021 x86_64 Linux
# php -v
PHP 7.4.29 (cli) (built: Apr 19 2022 01:09:03) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Yasd v0.3.9-alpha, Our Copyright, by codinghuang
with Zend OPcache v7.4.29, Copyright (c), by Zend Technologies
# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-alpine-linux-musl/10.3.1/lto-wrapper
Target: x86_64-alpine-linux-musl
Configured with: /home/buildozer/aports/main/gcc/src/gcc-10.3.1_git20211027/configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --build=x86_64-alpine-linux-musl --host=x86_64-alpine-linux-musl --target=x86_64-alpine-linux-musl --with-pkgversion='Alpine 10.3.1_git20211027' --enable-checking=release --disable-fixed-point --disable-libstdcxx-pch --disable-multilib --disable-nls --disable-werror --disable-symvers --enable-__cxa_atexit --enable-default-pie --enable-default-ssp --enable-cloog-backend --enable-languages=c,c++,d,objc,go,fortran,ada --disable-libssp --disable-libmpx --disable-libmudflap --disable-libsanitizer --enable-shared --enable-threads --enable-tls --with-system-zlib --with-linker-hash-style=gnu
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.3.1 20211027 (Alpine 10.3.1_git20211027)
CodeIgniter4: v4.2.4
VsCode: v: 1.70.2
Yasd: Version => 0.3.9-alpha
Swoole: Version => 4.8.9
Here is the log when I click args variable
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="property_get" transaction_id="18">
<property type="object" name="this->request" fullname="this->request" classname="CodeIgniter\HTTP\CLIRequest" children="1" numchildren="13">
<property type="array" name="segments" fullname="this->request->segments" children="1" numchildren="3"/>
<property type="array" name="options" fullname="this->request->options" children="0" numchildren="0"/>
<property type="array" name="args" fullname="this->request->args" children="1" numchildren="3"/>
<property type="string" name="method" fullname="this->request->method" size="3" encoding="base64">
<![CDATA[Y2xp]]>
</property>
<property type="string" name="proxyIPs" fullname="this->request->proxyIPs" size="0" encoding="base64">
<![CDATA[]]>
</property>
<property type="object" name="uri" fullname="this->request->uri" classname="CodeIgniter\HTTP\URI" children="1" numchildren="14"/>
<property type="null" name="protocolVersion" fullname="this->request->protocolVersion"/>
<property type="array" name="validProtocolVersions" fullname="this->request->validProtocolVersions" children="1" numchildren="3"/>
<property type="null" name="body" fullname="this->request->body"/>
<property type="array" name="headers" fullname="this->request->headers" children="0" numchildren="0"/>
<property type="array" name="headerMap" fullname="this->request->headerMap" children="0" numchildren="0"/>
<property type="string" name="ipAddress" fullname="this->request->ipAddress" size="0" encoding="base64">
<![CDATA[]]>
</property>
<property type="array" name="globals" fullname="this->request->globals" children="1" numchildren="1"/></property>
</response>
property_get -i 19 -d 0 -c 0 -p 0 -n "this->request->args"