Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
rylew1 committed Apr 5, 2024
1 parent d959c67 commit 4bc533b
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions docs/app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ This API uses a very simple [ApiKey authentication approach](https://apiflask.co

## VSCode Remote Attach Container Debugging

The API can be run in debug mode that allows for remote attach debugging (currently only supporting VSCode) to the container.
The API can be run in debug mode that allows for remote attach debugging (currently only supported from VSCode) to the container.

- Requirements:

Expand All @@ -118,14 +118,13 @@ The API can be run in debug mode that allows for remote attach debugging (curren
- First create a file `./vscode/launch.json` - as shown below. (Default name of `Python: Remote Attach`)

- Start the server in debug mode via `make start-debug` or `make start-debug run-logs`.
- This will start the `main-app` service on port 5678.
- This will start the `main-app` service with port 5678 exposed.

- The server will start waiting for you to attach the debugger (see `/src/app.py`) before continuing to run
- The server will start in waiting mode, waiting for you to attach the debugger (see `/src/app.py`) before continuing to run.

- Go to your VSCode debugger window and run the `Python: Remote Attach` option

- You should now be able to hit set breakpoints throughout the API
- Note that because there's a mapping between your code and the code in the container, if you start adding/removing code, the new breakpoints may not be on the same line in the container - in this case, you can simply rebuild or restart the server

`./vscode/launch.json`:

Expand All @@ -138,7 +137,7 @@ The API can be run in debug mode that allows for remote attach debugging (curren
"configurations": [
{
"name": "Python: Remote Attach",
"type": "python",
"type": "debugpy",
"request": "attach",
"connect": {
"host": "localhost",
Expand All @@ -147,10 +146,10 @@ The API can be run in debug mode that allows for remote attach debugging (curren
"pathMappings": [
{
"localRoot": "${workspaceFolder}/app",
"remoteRoot": "/app/src"
"remoteRoot": "."
}
],
"justMyCode": false
"justMyCode": false,
}
]
}
Expand Down

0 comments on commit 4bc533b

Please sign in to comment.