This code looks suspicious. You need to preserve the relative path, so that Node Inspector can run behind a proxy (see #293).

I am not familiar with the WS module, however it seems to me, that the full path is not important at all, is it? In that case it might be better to use a dummy value like `ws` instead of `debug?port=`, so that it's easier to find the related entry in DevTool's Network panel.