Skip to content

Commit 398a85c

Browse files
authored
Merge pull request #373 from itowlson/debugger-test
Debugger test app
2 parents 35e4b6d + ddaa4f8 commit 398a85c

File tree

10 files changed

+3580
-0
lines changed

10 files changed

+3580
-0
lines changed

test/debugger-testing/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## Debugger test apps
2+
3+
Apps in this directory can be used for testing the StarlingMonkey debugger against the Spin runtime.
4+
They are not intended for testing the SDK itself, or as example applications.
5+
6+
- Load the extension (https://github.com/bytecodealliance/StarlingMonkey/tree/main/debugger/vscode-dap-extension) into VS Code and run `npm run esbuild-all`.
7+
- Update the `launch.json` (https://github.com/bytecodealliance/StarlingMonkey/blob/main/debugger/vscode-dap-extension/.vscode/launch.json) to point to the test Spin app you want to exercise.
8+
- Hit F5. This loads the Spin app the extension development host with the debugger extension loaded.
9+
- Set any desired breakpoints or whatever on the Spin app - whatever debugger functionality you want to test.
10+
- Run `spin build` and hit F5.
11+
- Make a request to the Spin app (e.g. `curl localhost:3000`) and verify the debugger does whatever you need it to do!
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
dist
3+
target
4+
.spin/
5+
build/
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "starlingmonkey",
9+
"request": "launch",
10+
"name": "Debug StarlingMonkey component",
11+
"component": "${workspaceFolder}/out/spin-ts.wasm",
12+
"program": "${workspaceFolder}/src/index.ts",
13+
"stopOnEntry": false,
14+
"trace": true
15+
}
16+
]
17+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"starlingmonkey": {
3+
"componentRuntime": {
4+
"executable": "spin",
5+
"options": [
6+
"up",
7+
"-f",
8+
"${workspaceFolder}",
9+
"${debuggerEnvs}"
10+
],
11+
}
12+
}
13+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# `http-ts` Template
2+
3+
A starter template for building TypeScript HTTP applications with Spin.
4+
5+
## Getting Started
6+
7+
Build the App
8+
9+
```bash
10+
spin build
11+
```
12+
13+
## Run the App
14+
15+
```bash
16+
spin up
17+
```
18+
19+
## Using Spin Interfaces
20+
21+
To use additional Spin interfaces, install the corresponding packages:
22+
23+
| Interface | Package |
24+
|---------------|---------------------------------|
25+
| Key-Value | `@spinframework/spin-kv` |
26+
| LLM | `@spinframework/spin-llm` |
27+
| MQTT | `@spinframework/spin-mqtt` |
28+
| MySQL | `@spinframework/spin-mysql` |
29+
| PostgreSQL | `@spinframework/spin-postgres` |
30+
| Redis | `@spinframework/spin-redis` |
31+
| SQLite | `@spinframework/spin-sqlite` |
32+
| Variables | `@spinframework/spin-variables` |

0 commit comments

Comments
 (0)