• Returns: {string|undefined}

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

    1. $ node --inspect -p 'inspector.url()'
    2. Debugger listening on ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34
    3. For help see https://nodejs.org/en/docs/inspector
    4. ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34
    5. $ node --inspect=localhost:3000 -p 'inspector.url()'
    6. Debugger listening on ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a
    7. For help see https://nodejs.org/en/docs/inspector
    8. ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a
    9. $ node -p 'inspector.url()'
    10. undefined