Implement async-break
Summary:
There are two issues with async-break in VSCode:
1. A `pause` message with `preserveFocusHint` true does not trigger the UI to change from "running" mode to "paused" mode. Therefore although HHVM gets paused, it is not evident in the UI.
2. The `PauseCommand` sent by the client always has `threadId == 1`, no matter which threads' pause button is pressed. This makes it impossible for the pause command to target a specific thread.
We introduce a new program state for async-breaks. When a 'pause' message is sent in this mode, it sets `preserveFocusHint` to false. It causes all the requests to pause and VSCode opens the files where every request is paused. This is not ideal, but async breaks are used sparingly and it does not affect other commands. With the UI issues mentioned above, we may not have any way around this behavior.
Reviewed By: jeffreytan81
Differential Revision:
D32600305
fbshipit-source-id:
3c0c28209d0805e58730eb74766b772ca72ccd6c