diff --git a/.vscode/launch.json b/.vscode/launch.json index cb5161c03d..46f2bb0094 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -4,6 +4,13 @@ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ + { + "name": "Launch Chrome", + "request": "launch", + "type": "chrome", + "url": "http://localhost:5400/website-server/", + "webRoot": "${workspaceFolder}" + }, { "name": "Test playground sync", "request": "launch", diff --git a/packages/docs/site/docs/13-contributing/02-code.md b/packages/docs/site/docs/13-contributing/02-code.md index b898404ff4..ef13d96fa9 100644 --- a/packages/docs/site/docs/13-contributing/02-code.md +++ b/packages/docs/site/docs/13-contributing/02-code.md @@ -43,3 +43,18 @@ valet proxy playground.test http://localhost:5400 --secure ``` Your dev server is now available via https://playground.test. + +## Debugging + +### Debugging with VSCode and Chrome + +Playground can be debugged using VSCode and Chrome. To do so, follow these steps: + +- Open the project in VSCode +- Go to the _Run and Debug_ view (Ctrl+Shift+D) +- Select _Launch Chrome_ from the dropdown +- Click the green play button to start the debugger (F5) + +### Debugging PHP + +In the web version of Playground, you can see PHP errors in the browser console. PHP errors are also logged after every PHP request using `console.debug` in the browser console.