Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure xdebug stacktrace to link to and open files in VS Code

When xdebug provides a stacktrace, it can create links to open files in your text editor at a particular line. For instance, the following configuration will open files in Sublime, if the subl handler is installed:

xdebug.file_link_format="subl://open?url=%f&line=%l"

How does one set file_link_format for VS Code?

like image 855
Gregory Cosmo Haun Avatar asked Nov 02 '25 17:11

Gregory Cosmo Haun


1 Answers

Here's the documentation of the URL format for VS Code.

Thus, the xdebug config is:

xdebug.file_link_format="vscode://file/%f:%l"
like image 178
Gregory Cosmo Haun Avatar answered Nov 04 '25 08:11

Gregory Cosmo Haun