[code-server] Create a global launch.json template #76

Open
opened 2025-12-08 19:01:59 +01:00 by vlw · 1 comment
vlw commented 2025-12-08 19:01:59 +01:00 (Migrated from codeberg.org)

VSCode (code-server) has support for creating global workspace launch.json files which could be worth investigating.

While my usual [Xdebug] setup is no more than a simple pathMappings to the right directory, using this global config, we could perhaps get rid of some of the more annoying hiccups that we run into now and then when using VSCode's exception catcher. The PHP Debug extension has a few launch.json options that could be used to set up our Xdebug config once and for all (and other languages in the future). Excluding /vendor and everything in /var/www/tools would be very helpful.

Related SO post

VSCode (code-server) has support for creating [global workspace `launch.json` files](https://code.visualstudio.com/docs/debugtest/debugging-configuration#_global-launch-configuration) which could be worth investigating. While my usual [Xdebug] setup is no more than a simple `pathMappings` to the right directory, using this global config, we could perhaps get rid of some of the more annoying hiccups that we run into now and then when using VSCode's exception catcher. The PHP Debug extension has a few [launch.json options](https://marketplace.visualstudio.com/items?itemName=xdebug.php-debug#supported-launch.json-settings) that could be used to set up our Xdebug config once and for all (and other languages in the future). Excluding `/vendor` and everything in `/var/www/tools` would be very helpful. [Related SO post](https://stackoverflow.com/questions/36868021/is-it-possible-to-have-a-global-launch-json-file)
vlw commented 2026-01-29 22:47:47 +01:00 (Migrated from codeberg.org)

Another thought if we can't get this to work the way we want it to could be to set up a global usersnippet for the launch configs we wish to pre-define some settings for. We could probably track a new snippet file which contains all of our launch configurations.

Another thought if we can't get this to work the way we want it to could be to set up a global usersnippet for the launch configs we wish to pre-define some settings for. We could probably track a new snippet file which contains all of our launch configurations.
Sign in to join this conversation.
No labels
bug
feature
refactor
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
vlw/dotfiles#76
No description provided.