adt/nette-tracy-component-locator

v1.0.1 2023-02-15 12:21 UTC

This package is auto-updated.

Last update: 2024-09-15 16:04:17 UTC


README

使用以下命令进行安装:composer require --dev adt/nette-tracy-component-locator

将以下内容添加到项目中,例如添加到 BasePresenter::afterRender 方法

if (class_exists('\ADT\ComponentLocator\ComponentLocator')) {
	\ADT\ComponentLocator\ComponentLocator::initializePanel($this);
}

确保在本地 neon 中有类似这样的内容

tracy:
	editor: "phpstorm://open?file=%file&line=%line"
	#editor: 'editor://%action/?file=%file&line=%line&search=%search&replace=%replace'
	editorMapping:
		/var/www/html/: /your/real/path/to/project/

	bar:
		- \ADT\ComponentLocator\ComponentLocator

在 Ubuntu 上,编辑器路径应该是这样的:phpstorm://open?url=file://%file&line=%line

如果项目在 Docker 中运行,则需要参数 editorMapping