Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

View private properties of parent class will crashed #170

Closed
anhoder opened this issue Apr 15, 2022 · 2 comments
Closed

View private properties of parent class will crashed #170

anhoder opened this issue Apr 15, 2022 · 2 comments

Comments

@anhoder
Copy link

anhoder commented Apr 15, 2022

  1. What did you do? If possible, provides a simple script and debug step to reproduce the problem.
// In PHPStorm
<?php

class Foo
{
  public $name = 'foo';
}

class Bar
{
  private $foo;

  public function __construct()
  {
    $this->foo = new Foo();
  }
}

class AnotherBar extends Bar
{
  public function hello()
  {
    echo 'hello'; // 在这打断点,查看$this->foo时直接退出
  }
}

$bar = new AnotherBar();
$bar->hello();
  1. What did you expect to see?

能正常查看对应的值

  1. What did you see instead?

报错退出
image

  1. What is your machine environment used (show your uname -a & php -v & gcc -v) ?
Darwin anhoder-4.local 21.4.0 Darwin Kernel Version 21.4.0: Fri Mar 18 00:47:26 PDT 2022; root:xnu-8020.101.4~15/RELEASE_ARM64_T8101 arm64

PHP 8.0.15 (cli) (built: Jan 20 2022 04:21:28) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.15, Copyright (c) Zend Technologies
    with Yasd v0.3.9-alpha, Our Copyright, by codinghuang
    with Zend OPcache v8.0.15, Copyright (c), by Zend Technologies

Apple clang version 13.1.6 (clang-1316.0.21.2.3)
Target: arm64-apple-darwin21.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
@anhoder anhoder changed the title View the private properties of parent class will crashed View private properties of parent class will crashed Apr 15, 2022
@735579768
Copy link

遇到同样的问题

@huanghantao
Copy link
Member

Can consider to use swoole https://github.com/swoole/swoole-src/tree/support-xdebug

You can use xdebug directly, as long as the PHP version is 8.1 or greater

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants