Skip to content

Commit

Permalink
add new ui debugging instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
jbraswell committed Jul 2, 2024
1 parent 8d906a0 commit bc463a8
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,33 @@ To install the UI's dependencies, run the `npm install` command from the `src` d

When working on the UI, you'll need to have the [Vite](https://vitejs.dev/) dev server running. To start the dev server, run `npm run dev` from the `src` directory. While the dev server is running, the UI is served out of the `resources/js` directory instead of the normal `public` directory, and [hot module replacement](https://vitejs.dev/guide/features.html#hot-module-replacement) is enabled.

### Debugging the New UI
This assumes you are using VS Code to develop the new UI.

#### Debugging From the Browser
First, follow the instructions above for running the root server under Docker with `NEW_UI_ENABLED` set to `'true'`. This mostly just involves running `make dev`.

Then, create `.vscode/launch.json` with a `chrome` debug configuration:

```
{
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:8000/main_server/",
"webRoot": "${workspaceFolder}/src/resources/js"
}
]
}
```

You should now be able to set breakpoints, launch this debug configuration, and step through the code.

#### Debugging Tests

## Some useful `make` commands

- `make help` Describe all of the make commands.
Expand Down

0 comments on commit bc463a8

Please sign in to comment.