markdown
以前寫過一篇是用 Sublime 開啟 Tracy 偵錯的檔案: [善用工具 -- Tracy 讓 PHP Debug 變簡單了](https://devmanna.blogspot.com/2015/10/tracy-tracy-php-debug.html)
現在都用 VS Code 或 PhpStorm 來寫 PHP 專案
來記錄一下怎麼使用 VS Code 來開啟 Laravel-Tracy 偵錯到的檔案
### 環境
- Laravel-Tracy 1.8.23
- VS Code 1.35.0
### 編輯器設定
Protocol: `vscode://file/%file:%line`
[Tracy](https://tracy.nette.org/en/) 的設定如下
```php
// Visual Studio Code
Tracy\Debugger::$editor = 'vscode://file/%file:%line';
```
[Laravel-Tracy](https://github.com/recca0120/laravel-tracy) 的設定如下 (`config/tracy.php`)

### 瀏覽器
以下為各個瀏覽器用 VS Code 來開啟檔案的對話視窗
Microsoft Edge

Chrome

Firefox

### References
- [How to open a file in editor from Tracy?](https://tracy.nette.org/en/open-files-in-ide)
- [Laravel-Tracy](https://github.com/recca0120/laravel-tracy)
沒有留言:
張貼留言