-
Notifications
You must be signed in to change notification settings - Fork 216
Description
Describe the bug
The repository contains the file .vscode/launch.json
file with the following contents at the time of writing:
woocommerce-gateway-stripe/.vscode/launch.json
Lines 1 to 27 in 941c26b
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Listen for Xdebug (remote/docker)", | |
"type": "php", | |
"request": "launch", | |
"hostname": "0.0.0.0", | |
"port": 9000, | |
"pathMappings": { | |
"/var/www/html/": "${workspaceFolder}/docker/wordpress", | |
"/var/www/html/wp-content/plugins/woocommerce-gateway-stripe/": "${workspaceFolder}" | |
}, | |
"preLaunchTask": "enable:xdebug", | |
"postDebugTask": "disable:xdebug" | |
}, | |
{ | |
"name": "Listen for Xdebug (local)", | |
"type": "php", | |
"request": "launch", | |
"port": 9000, | |
} | |
] | |
} |
While useful for development on Docker, it is unsuitable for other development environments (in my case Chassis, a Vagrant environment. This results in a dirty diff for developers using anything other than Docker to develop.
While using Docker is possible, the plugin is intended to run on a range of systems that will have differences from the container provided. As such, allowing developers to use a range of systems increases the stability of the product.
Including the file in the repo introduces two risks:
- missed issues on non-docker environments as checking out the launch file will prevent xdebug running
- accidental commits on non-docker environments breaking xdebug for docker.
To Reproduce
- Check out the repository.
- Edit the
.vscode/launch.json
file, easiest to edit the comment in the header - run
git status
- Observe that the repository is now dirty.
Expected behavior
IDE specific files be ignored. Default versions could be provided in either the Docs or Docker directories.
Screenshots
Environment (please complete the following information):
- WordPress Version: 6.8-alpha-59725
- WooCommerce Version: 9.6.0
- Stripe Plugin Version:
develop
- Browser: N/A
- Any other plugins installed: N/A
Additional context
For Chassis (Vagrant), the config file differs:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Listen for Xdebug (Vagrant)",
"type": "php",
"request": "launch",
"port": 9000,
"pathMappings": {
"/vagrant": "${workspaceRoot}/../../.."
}
}
]
}