Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add VSCode Chrome debugging support #1088

Merged
merged 2 commits into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
15 changes: 15 additions & 0 deletions packages/docs/site/docs/13-contributing/02-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Loading