Skip to content

Commit dad84da

Browse files
Adding support for F5 experience in VS Code (microsoft#40)
* Adding support for F5 experience in VS Code * Update examples/README.md Co-authored-by: Daniel Rosenwasser <[email protected]> * Small updates to readmes --------- Co-authored-by: Daniel Rosenwasser <[email protected]>
1 parent 9165529 commit dad84da

File tree

13 files changed

+115
-2
lines changed

13 files changed

+115
-2
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ node_modules/
1010
# Local development and debugging
1111
**/.vscode/*
1212
**/tsconfig.debug.json
13+
!**/.vscode/launch.json
1314

1415

examples/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ AZURE_OPENAI_API_KEY=...
9393

9494
Examples can be found in the `examples` directory.
9595

96-
To run an example interactively, type `node ./dist/main.js` from the example's directory and enter requests when prompted. Type `quit` or `exit` to end the session.
96+
To run an example interactively, type `node ./dist/main.js` from the example's directory and enter requests when prompted. Type `quit` or `exit` to end the session. You can also open in VS Code the selected example's directory and press <kbd>F5</kbd> to launch it in debug mode.
9797

9898
Note that there are various sample "prose" files (e.g. `input.txt`) provided in each `src` directory that can give a sense of what you can run.
9999

examples/calendar/.vscode/launch.json

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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": "node",
9+
"request": "launch",
10+
"name": "Launch Program",
11+
"skipFiles": [
12+
"<node_internals>/**"
13+
],
14+
"program": "${workspaceFolder}/dist/main.js",
15+
"console": "externalTerminal"
16+
}
17+
]
18+
}

examples/calendar/src/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
"noUnusedLocals": true,
1212
"noUnusedParameters": true,
1313
"exactOptionalPropertyTypes": true,
14+
"inlineSourceMap": true
1415
}
1516
}
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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": "node",
9+
"request": "launch",
10+
"name": "Launch Program",
11+
"skipFiles": [
12+
"<node_internals>/**"
13+
],
14+
"program": "${workspaceFolder}/dist/main.js",
15+
"console": "externalTerminal"
16+
}
17+
]
18+
}

examples/coffeeShop/src/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
"noUnusedLocals": true,
1212
"noUnusedParameters": true,
1313
"exactOptionalPropertyTypes": true,
14+
"inlineSourceMap": true
1415
}
1516
}

examples/math/.vscode/launch.json

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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": "node",
9+
"request": "launch",
10+
"name": "Launch Program",
11+
"skipFiles": [
12+
"<node_internals>/**"
13+
],
14+
"program": "${workspaceFolder}/dist/main.js",
15+
"console": "externalTerminal"
16+
}
17+
]
18+
}

examples/music/.vscode/launch.json

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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": "node",
9+
"request": "launch",
10+
"name": "Launch Program",
11+
"skipFiles": [
12+
"<node_internals>/**"
13+
],
14+
"program": "${workspaceFolder}/dist/main.js",
15+
"console": "externalTerminal"
16+
}
17+
]
18+
}
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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": "node",
9+
"request": "launch",
10+
"name": "Launch Program",
11+
"skipFiles": [
12+
"<node_internals>/**"
13+
],
14+
"program": "${workspaceFolder}/dist/main.js",
15+
"console": "externalTerminal"
16+
}
17+
]
18+
}

examples/restaurant/src/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
"noUnusedLocals": true,
1212
"noUnusedParameters": true,
1313
"exactOptionalPropertyTypes": true,
14+
"inlineSourceMap": true
1415
}
1516
}
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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": "node",
9+
"request": "launch",
10+
"name": "Launch Program",
11+
"skipFiles": [
12+
"<node_internals>/**"
13+
],
14+
"program": "${workspaceFolder}/dist/main.js",
15+
"console": "externalTerminal"
16+
}
17+
]
18+
}

examples/sentiment/src/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
"noUnusedLocals": true,
1212
"noUnusedParameters": true,
1313
"exactOptionalPropertyTypes": true,
14+
"inlineSourceMap": true
1415
}
1516
}

site/src/docs/examples.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ AZURE_OPENAI_API_KEY=...
9696

9797
Examples can be found in the `examples` directory.
9898

99-
To run an example interactively, type `node ./dist/main.js` from the example's directory and enter requests when prompted. Type `quit` or `exit` to end the session.
99+
To run an example interactively, type `node ./dist/main.js` from the example's directory and enter requests when prompted. Type `quit` or `exit` to end the session. You can also open in VS Code the selected example's directory and press <kbd>F5</kbd> to launch it in debug mode.
100100

101101
Note that there are various sample "prose" files (e.g. `input.txt`) provided in each `src` directory that can give a sense of what you can run.
102102

0 commit comments

Comments
 (0)