xdebug setup for VS Code in WooCommerce development

This is for contributing to WooCommerce development here not developing client sites with WooCommerce.

configuration in launch.json

	"name": "Listen for XDebug",
	"type": "php",
	"request": "launch",
	"port": 9003,
	"pathMappings": {
		"/var/www/html/wp-content/plugins/woocommerce": "${workspaceFolder}/plugins/woocommerce"

start xdebug with wp-env

// I don't have a proper syntax highlighter set up for this
// this is in the terminal when you're starting the Docker environment
% pnpm -- wp-env start --xdebug

Leave a Reply

Your email address will not be published. Required fields are marked *

By submitting this comment, you are agreeing to the use of Akismet which helps reduce spam. You can view Akismet’s privacy policy here. Your email, website and name are also stored on this site.