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

watch栏目,只能显示一个层级的内容 #844

Closed
wuqiyin opened this issue Oct 8, 2022 · 3 comments
Closed

watch栏目,只能显示一个层级的内容 #844

wuqiyin opened this issue Oct 8, 2022 · 3 comments

Comments

@wuqiyin
Copy link

wuqiyin commented Oct 8, 2022

PHP version:7.4
Xdebug version:3.0

Your launch.json:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 9901,
"xdebugSettings": {// 不然变量的名称太长的话只能查看部分
"max_data": -1,
"max_children": 100000,
}
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 0,
"runtimeArgs": [
"-dxdebug.start_with_request=yes"
],
"env": {
"XDEBUG_MODE": "debug,develop",
"XDEBUG_CONFIG": "client_port=${port}"
}
},
{
"name": "Launch Built-in web server",
"type": "php",
"request": "launch",
"runtimeArgs": [
"-dxdebug.mode=debug",
"-dxdebug.start_with_request=yes",
"-S",
"localhost:0"
],
"program": "",
"cwd": "${workspaceRoot}",
"port": 9901,
"serverReadyAction": {
"pattern": "Development Server \(http://localhost:([0-9]+)\) started",
"uriFormat": "http://localhost:%s",
"action": "openExternally"
}
}
]
}
Xdebug php.ini config:
[xdebug]
zend_extension=xdebug.so
xdebug.mode=debug
xdebug.client_host=127.0.0.1
xdebug.client_port=9901
xdebug.start_with_request = yes

问题:
image

@zobo
Copy link
Contributor

zobo commented Oct 8, 2022

Hi. I hope I understand your problem correctly.

A simple solution is to add max_depth:10 under xdebugSettings, next to max_data.

I will improve this with next releases.

Let me know if this solves your problem.

@wuqiyin
Copy link
Author

wuqiyin commented Oct 9, 2022

With this method, my problem has been solved, thank you!

"xdebugSettings": {// 不然变量的名称太长的话只能查看部分
    "max_depth": 10,// 这个顺序一定要放在第一个,不然wath里看不到内部调试
    "max_data": -1,
    "max_children": 100000,
}

@zobo
Copy link
Contributor

zobo commented Oct 9, 2022

Great!
A related issue is #808. I plan to implement it so that dynamic child fetch will also be possible in watch pane.

@zobo zobo closed this as completed Oct 9, 2022
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

2 participants