HHVM VSDebugExtension - Implement debugger command infrastructure - 8/N
commitda255af762d11c12d81b6a81c30fb9d58bc30095
authorEric Bluestein <ericblue@fb.com>
Thu, 4 Jan 2018 02:57:47 +0000 (3 18:57 -0800)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Thu, 4 Jan 2018 03:07:55 +0000 (3 19:07 -0800)
treea589eb724400ef4e223a94d36a61cecff5a9e90a
parent3805fab55ccd4dc3bf5d1896ef92128b23b0b091
HHVM VSDebugExtension - Implement debugger command infrastructure - 8/N

Summary:
This diff adds the machinery necessary for receiving VS Code debug protocol commands from the client via one of the debugger transports, and processing them. Currently no commands are implemented yet (we just log an error and issue a response).

Each command will have a target, depending on what context it should be evaluated in:
 - None: commands that need to be executed inline as they are received (think Set Breakpoint, Disconnect, ...)
 - Request: commands are sent to a particular request (think EvaluateOnCallFrame). These are enqueued into the correct thread's CommandQueue to be picked up next time the request calls into the debugger hook
 - Dummy: commands are sent to the dummy request thread (think RuntimeEvaluate)

The debugger will wrap each command execution to ensure an appropriate protocol response or error is sent back to the client.

Reviewed By: rightparen

Differential Revision: D6266497

fbshipit-source-id: b1b76e04a41836ebedd8ff9ee87f26d09df18142
hphp/runtime/ext/vsdebug/command.cpp [copied from hphp/runtime/ext/vsdebug/command_queue.cpp with 55% similarity]
hphp/runtime/ext/vsdebug/command.h [new file with mode: 0644]
hphp/runtime/ext/vsdebug/command_queue.cpp
hphp/runtime/ext/vsdebug/command_queue.h
hphp/runtime/ext/vsdebug/config.cmake
hphp/runtime/ext/vsdebug/debugger.cpp
hphp/runtime/ext/vsdebug/debugger.h
hphp/runtime/ext/vsdebug/session.cpp
hphp/runtime/ext/vsdebug/session.h
hphp/runtime/ext/vsdebug/transport.cpp