Fixed a race condition in the debug-server.js
Now setting the port number as a query string. If no port number is provided the default port will be used.