HHVM Debugger: Add support for an info command
commit1b0e6bb322c95d9d440648ef2ac4ea85114abc97
authorEric Bluestein <ericblue@fb.com>
Fri, 14 Sep 2018 17:34:44 +0000 (14 10:34 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Fri, 14 Sep 2018 17:43:38 +0000 (14 10:43 -0700)
tree6cf918a9b24b170beec3e96a8a8f23b884ee2588
parentab6815eb066f71d6e19b858840c6fcc143162c4d
HHVM Debugger: Add support for an info command

Summary:
This command is not part of the protocol and is experimental, but is needed for CLI feature pairity with hphpd.

Schema for new request and response:

    export interface InfoRequest extends Request {
      // command: 'info';
      arguments: InfoRequestArguments;
    }

    /** Arguments for 'info' request. */
    export interface InfoRequestArguments {
      /** The thread ID to retrieve info from */
      threadId: number;

      /** The name of the object to retrieve info about. Valid options are:
       *
       * <empty string> - Returns info for the current function or method the current thread is stopped at.
       * className - Returns the declaration of the specified class
       * functionName - Returns the declaration of the specified function
       * cls::method - Returns the declaration of the specified class method
       * cls::constant - Returns the declaration of the specified class constant
       * cls:$prop - Returns the declaration of the specified class property
       */
      object: string;
    }

    /** Response for 'info' request. */
    export interface InfoResponse extends Response {
      body: {
        /** The requested declaration information. */
        info: string;
      };
    }

Reviewed By: velocityboy

Differential Revision: D9780914

fbshipit-source-id: f4dfc4307a9a34421ec6e7f90f30c93675b2cacb
hphp/runtime/debugger/cmd/cmd_info.cpp
hphp/runtime/debugger/cmd/cmd_info.h
hphp/runtime/ext/vsdebug/command.cpp
hphp/runtime/ext/vsdebug/command.h
hphp/runtime/ext/vsdebug/config.cmake
hphp/runtime/ext/vsdebug/ext_vsdebug.h
hphp/runtime/ext/vsdebug/info_command.cpp [new file with mode: 0644]
hphp/test/slow/ext_vsdebug/info.php [new file with mode: 0644]
hphp/test/slow/ext_vsdebug/info.php.expectf [new file with mode: 0644]
hphp/test/slow/ext_vsdebug/info.php.test [new file with mode: 0644]