aboutsummaryrefslogtreecommitdiff
path: root/packages/bun-vscode/example/example.ts
diff options
context:
space:
mode:
authorGravatar Ashcon Partovi <ashcon@partovi.net> 2023-08-24 22:53:34 -0700
committerGravatar GitHub <noreply@github.com> 2023-08-24 22:53:34 -0700
commit1480889205d49cf7221a36608a8896b452967cea (patch)
treee1427e4041cf19ef1e8e8e0f58cfbbceb4cbbf74 /packages/bun-vscode/example/example.ts
parentf269432d90826ad3e5b66c7685a6e826e0fb05e2 (diff)
downloadbun-1480889205d49cf7221a36608a8896b452967cea.tar.gz
bun-1480889205d49cf7221a36608a8896b452967cea.tar.zst
bun-1480889205d49cf7221a36608a8896b452967cea.zip
Improved support for `debug-adapter-protocol` (#4186)
* Improve support for \`debug-adapter-protocol\` * More improvements, fix formatting in debug console * Fix attaching * Prepare for source maps * Start of source map support, breakpoints work * Source map support * add some package.jsons * wip * Update package.json * More fixes * Make source maps safer if exception occurs * Check bun version if it fails * Fix console.log formatting * Fix source maps partly * More source map fixes * Prepare for extension * watch mode with dap * Improve preview code * Prepare for extension 2 --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Diffstat (limited to 'packages/bun-vscode/example/example.ts')
-rw-r--r--packages/bun-vscode/example/example.ts34
1 files changed, 34 insertions, 0 deletions
diff --git a/packages/bun-vscode/example/example.ts b/packages/bun-vscode/example/example.ts
new file mode 100644
index 000000000..386b97f7c
--- /dev/null
+++ b/packages/bun-vscode/example/example.ts
@@ -0,0 +1,34 @@
+export default {
+ async fetch(request: Request): Promise<Response> {
+ a(request);
+ const coolThing: CoolThing = new SuperCoolThing();
+ coolThing.doCoolThing();
+ debugger;
+ return new Response("HELLO WORLD");
+ },
+};
+
+// a
+function a(request: Request): void {
+ b(request);
+}
+
+// b
+function b(request: Request): void {
+ c(request);
+}
+
+// c
+function c(request: Request) {
+ console.log(request);
+}
+
+interface CoolThing {
+ doCoolThing(): void;
+}
+
+class SuperCoolThing implements CoolThing {
+ doCoolThing(): void {
+ console.log("BLAH BLAH");
+ }
+}