← 返回命令列表

Linux command

var-dump-server 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Start server on the default address

var-dump-server

Start on a custom host and port

var-dump-server --host=[127.0.0.1:9912]

Output dumps in HTML format to a file

var-dump-server --format=html > [dump.html]

说明

var-dump-server starts a server that collects and displays variable dumps from PHP applications using the Symfony VarDumper component. Instead of dumping variables directly into the browser or console output, the application sends them to this centralized server for structured display. This approach keeps debug output separate from application responses, making it particularly useful for debugging API endpoints, AJAX requests, and command-line scripts. The server formats dumps with syntax highlighting and collapsible structures, providing a cleaner debugging experience than inline var_dump output.

参数

--host _ADDR_
Bind address and port (default: 127.0.0.1:9912, or the VAR_DUMPER_SERVER env var).
--format _FMT_
Output format (cli or html).
--help
Show help.

FAQ

What is the var-dump-server command used for?

var-dump-server starts a server that collects and displays variable dumps from PHP applications using the Symfony VarDumper component. Instead of dumping variables directly into the browser or console output, the application sends them to this centralized server for structured display. This approach keeps debug output separate from application responses, making it particularly useful for debugging API endpoints, AJAX requests, and command-line scripts. The server formats dumps with syntax highlighting and collapsible structures, providing a cleaner debugging experience than inline var_dump output.

How do I run a basic var-dump-server example?

Run `var-dump-server` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --host _ADDR_ do in var-dump-server?

Bind address and port (default: 127.0.0.1:9912, or the VAR_DUMPER_SERVER env var).