VSCodium editor support for links on error page

Hello Forum,

I’m using VSCodium as an editor which is basically an OpenSource variant of Microsoft’s editor VS Code but without built-in telemetry and tracking :heart_eyes:.

In “yourapp/config/app.php” you can configure only “vscode”, so you can not open links on the error page directly in VSCodium.

What you can do is to edit “yourapp/cakephp/testapp/vendor/cakephp/cakephp/src/Error/Debugger.php” and add the following line to “protected array $editors”:

protected array $editors = [
        [......]   
       'vscodium' => 'vscodium://file/{file}:{line}',
];

Now you can enter “vscodium” in “yourapp/config/app.php” and can open links directly in VSCodium:

'Debugger' => [`
        'editor' => 'vscodium',
],

Hope this helps and that VSCodium will be added in future versions of CakePHP.

Happy coding and have a good day

P.S. Sorry, just found out that there is a much simpler and more update proof way of adding an editor.

Just add the the following line in “src/Application.php” in the bootstrap function and add the use directive above.

use Cake\Error\Debugger;

class Application extends BaseApplication
{
  [...]
   public function bootstrap(): void
       {
          [...]
          Debugger::addEditor('vscodium', 'vscodium://file/{file}:{line}');
          [...]
        }
  [...]
}

You found it yourself :wink:

Otherwise see Debugging - 5.x as well

You can also just add it to your config/bootstrap.php as well, doesn’t need to be in the Application class.

1 Like

Yes :partying_face:

But would be nice if VSCodium could be integrated in “yourapp/cakephp/testapp/vendor/cakephp/cakephp/src/Error/Debugger.php” in future releases of CakePHP, as I think it is getting quite popular

To be honest, its the first time I have heard of it :sweat_smile:
But feel free to create a PR on the cakephp/cakephp repository and add it.

Then you should try it :stuck_out_tongue_winking_eye: … it’s 1:1 VSCode

Regarding the PR … I don’t have a Github account as it is from Microsoft :rofl:

Have a fantastic day and thanks for your great work. Just watched all of your YT Tutorials - really very very helpful :+1:t2:

Sorry, I am very happy with PHPStorm (which gets paid by my company) so there is no real reason to switch :sweat_smile:

1 Like

See 5.next: add vscodium to Debugger by LordSimal · Pull Request #18056 · cakephp/cakephp · GitHub

1 Like

Thank you so much :heart_eyes:

Cheers from one of the “special individuals” :rofl: