Open ivawzh opened 1 year ago
We do plan on having a better debugging experience, which might include node:inspector
. However, for typedoc, it looks like it's just doing a simple see if it's in debug mode.
import { url } from "inspector";
// ...
const isDebugging = () => !!url();
In the interim, we should consider adding a no-op polyfill. cc @Jarred-Sumner
@Electroid I want to flag another possible use case for something similar to node:inspector
. As discussed in this thread we are interested in exposing the length of the runtime micro task queue as a metric for our app.
As an orthogonal task to this we are also looking into Bun.
So... Marrying the two concepts here: Is there a way to do what we want in Bun today? Perhaps via some 'bun:inspector' API, or via JavaScriptCore directly perhaps?
Is it possible to write a polyfill for it so that i can use typedoc with bun or is this something that needs to be fixed on buns side?
In our case we have decided against this feature as it was a significant cost to scan the JS heap looking for promises. It was so slow there is no way we can afford to run it in prod.
Now, if there was a simple atomic counter counting the promises in the micro task queue that would be much more efficient. IDK how feasible that would be.
This error comes up when trying to run vite --profile
too.
I also get this error when trying to compile my docs via Typedoc.
+1, same with @pm2/io
Also hit this trying to use typedoc.
From pm2 log-rotate
NotImplementedError: node:inspector Session is not yet implemented in Bun. Track the status & thumbs up the issue: https://github.com/oven-sh/bun/issues/2445
code: "ERR_NOT_IMPLEMENTED"
at new NotImplementedError (internal:shared:19:27)
at internal:shared:2:69
at new Session (node:inspector:13:27)
at init (/home/portal/.bun/install/global/node_modules/@pm2/io/build/main/services/inspector.js:13:24)
at init (/home/portal/.bun/install/global/node_modules/@pm2/io/build/main/pmx.js:77:13)
at /home/portal/.bun/install/global/node_modules/@pm2/io/build/main/index.js:5:45
at injectModules (/home/portal/.bun/install/global/node_modules/pm2/lib/ProcessUtils.js:6:13)
at /home/portal/.bun/install/global/node_modules/pm2/lib/ProcessContainerFork.js:9:1
Bun v1.1.7-canary.1+bbb906c66 (Linux x64 baseline)
also running into this issue with vitest ui mode
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Error ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯NotImplementedError: node:inspector is not yet implemented in Bun. Track the status & thumbs up the issue: https://github.com/oven-sh/bun/issues/2445
❯ new ::bunternal:: internal:shared:19:14
❯ ::bunternal:: internal:shared:2:35
❯ new ::bunternal:: node:inspector:13:14
❯ module code node_modules/@vitest/coverage-v8/dist/index.js:4:17
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯Serialized Error: { code: 'ERR_NOT_IMPLEMENTED', originalLine: 19, originalColumn: 14, line: 19, column: 14, sourceURL: 'internal:shared' }
What is the problem this feature would solve?
Due to lacking support of
node:inspector
, our bun projects cannot support typedoc. This is very troubling as we own a significant amount of repos and rely on typedoc to generate all-in-one documentation.What is the feature you are proposing to solve the problem?
Support
inspector
or having alternative way to walk around.What alternatives have you considered?
No response