setup debug
This commit is contained in:
parent
254cd45a2c
commit
b118ba02f9
16
.vscode/launch.json
vendored
Normal file
16
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"request": "launch",
|
||||
"name": "Debug Serve Mode",
|
||||
"type": "node",
|
||||
"runtimeExecutable": "deno",
|
||||
"runtimeArgs": ["task", "debug"],
|
||||
"attachSimplePort": 9229
|
||||
}
|
||||
]
|
||||
}
|
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@ -1,5 +1,4 @@
|
||||
{
|
||||
"deno.enable": true,
|
||||
"deno.unstable": true,
|
||||
"deno.config": "./deno.json"
|
||||
"deno.unstable": true
|
||||
}
|
@ -12,6 +12,7 @@
|
||||
"tasks":
|
||||
{
|
||||
"local": "deno run -A --no-lock ./run-local.tsx --port=1234",
|
||||
"serve": "deno run -A --no-lock ./run-serve.tsx --port=1234"
|
||||
"serve": "deno run -A --no-lock ./run-serve.tsx --port=1234",
|
||||
"debug": "deno run -A --inspect-wait --no-lock ./run-serve.tsx --port=1234"
|
||||
}
|
||||
}
|
@ -33,9 +33,6 @@ Configure({
|
||||
{
|
||||
|
||||
// we dont need to add ?reload= because this fetch is by way the file system not the hosted url
|
||||
|
||||
console.log("collecting exports for", Root+inURL.pathname);
|
||||
|
||||
const [local, foreign] = await Collect.FileExports(Root+inURL.pathname);
|
||||
const code =`
|
||||
import {FileListen} from ">able/hmr-listen.tsx";
|
||||
@ -66,10 +63,6 @@ Configure({
|
||||
catch(e){ /**/ }
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
console.log("not collecting", inURL.pathname)
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
@ -278,7 +278,16 @@ export const Configure =(config:ConfigurationArgs)=>
|
||||
}
|
||||
|
||||
await ImportMapReload();
|
||||
await SWCW.default();
|
||||
try
|
||||
{
|
||||
await SWCW.default();
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
console.log("swc init error:", e);
|
||||
}
|
||||
|
||||
|
||||
const server = Deno.serve({port:parseInt(Deno.env.get("port")||"8000")}, async(req: Request)=>
|
||||
{
|
||||
const url:URL = new URL(req.url);
|
||||
@ -363,4 +372,5 @@ const server = Deno.serve({port:parseInt(Deno.env.get("port")||"8000")}, async(r
|
||||
|
||||
return new Response(`{"error":"unmatched route", "path":"${url.pathname}"}`, {status:404, headers});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user