DEV Community

Tyler Smith
Tyler Smith

Posted on

Change Laravel's exception screen code editor

One of Laravel's killer features is Ignition, a gorgeous error screen made by the good people at Spatie. Ignition shows the entire call stack, and if you hover over a line of code, you can click a pencil icon to take you to that exact line in a code editor. Unfortunately for me, the default editor is set to PhpStorm and I'm an avid VS Code user.

Thankfully, changing the default code editor is straightforward. Open your project's .env file and add IGNITION_EDITOR as an environment variable.

# Supported editors include "phpstorm", "vscode", "vscode-insiders",
# "sublime", "atom" and "nova"

Enter fullscreen mode Exit fullscreen mode

Changing other Ignition settings

To see all of Ignition's configuration, visit the Ignition installation page and follow along with the section about publishing configuration files. Running the command to publish your config files will create config/ignition.php within your project, which includes full notes about each setting.

If you'd rather just use your .env file for configuration, copy the config/ignition.php settings into your .env file, then delete Ignition's config file when you're done. Everything will continue to work.

I hope this post saved you some time!

Discussion (0)