Skip to content

Commit f3de7e8

Browse files
authored
添加 环境变量显示
1 parent 01d277f commit f3de7e8

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/Runner.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use think\App;
66
use think\facade\Request;
7+
use think\facade\Env;
78
use Whoops\Handler\PrettyPageHandler;
89
use Whoops\Run;
910

@@ -44,10 +45,16 @@ public function handleException($exception)
4445
'Port' => Request::port(),
4546
'Host' => Request::host(),
4647
]);
48+
49+
// 环境变量
50+
$handler->addDataTable('Environment', Env::get());
4751

52+
// 从异常堆栈跟踪中打开代码编辑器
4853
if ($this->options['editor']) {
4954
$handler->setEditor($this->options['editor']);
5055
}
56+
57+
// 设置标题
5158
$handler->setPageTitle($this->options['title']);
5259
}
5360
}

0 commit comments

Comments
 (0)