We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 123327d commit 1cce000Copy full SHA for 1cce000
doc/api/inspector.md
@@ -52,6 +52,21 @@ parameter usage.
52
53
Return the URL of the active inspector, or `undefined` if there is none.
54
55
+```console
56
+$ node --inspect -p 'inspector.url()'
57
+Debugger listening on ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34
58
+For help see https://nodejs.org/en/docs/inspector
59
+ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34
60
+
61
+$ node --inspect=localhost:3000 -p 'inspector.url()'
62
+Debugger listening on ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a
63
64
+ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a
65
66
+$ node -p 'inspector.url()'
67
+undefined
68
+```
69
70
## inspector.waitForDebugger()
71
<!-- YAML
72
added: v12.7.0
0 commit comments