Poll the state of the target during launch
Previously, the launch process is synchronous, which is problematic, since if the operation breaks, it hangs the debugger. I have recently changed it to async (in various commits, e.g., d972a36748861e4c9c6f24d686e2895f3ebe61a5). However, this is also not perfect since there is a possibility that after we send the launch request, we never hear back from the backend. This also hangs the debugger.
Although normally the debug adapter should either report a success (e.g., target stopped), or a failure (failure to connect), but it could just keep working on it and does not respond in a reasonable time. For example, when we typed a wrong host while connecting to a remote host. Althogh eventually the network request would timeout and fail, but it might take 30 seconds and the debugger appear hang during the process.
We should change the code logic to poll the status repeatedly after we send the launch request. This allow us to control the time we wish to wait for the target. And we can also report a "progress" on the operation.