Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions doc/api/inspector.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,21 @@ parameter usage.

Return the URL of the active inspector, or `undefined` if there is none.

```js
// Node process was called with --inspect flag
require('inspector').url()
'ws://127.0.0.1:9229/whatever'

// Node process was called with --inspect=localhost:3000 flag
require('inspector').url()
'ws://localhost:3000/whatever'
// ---^ host ---^ port

// Node process was called without --inspect flag
require('inspector').url()
undefined
```

## inspector.waitForDebugger()
<!-- YAML
added: v12.7.0
Expand Down