debugger.proto 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. // Copyright (c) 2015, Google Inc.
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package google.devtools.clouddebugger.v2;
  16. import "google/api/annotations.proto";
  17. import "google/devtools/clouddebugger/v2/data.proto";
  18. import "google/protobuf/empty.proto";
  19. option java_multiple_files = true;
  20. option java_outer_classname = "DebuggerProto";
  21. option java_package = "com.google.devtools.clouddebugger.v2";
  22. // The Debugger service provides the API that allows users to collect run-time
  23. // information from a running application, without stopping or slowing it down
  24. // and without modifying its state. An application may include one or
  25. // more replicated processes performing the same work.
  26. //
  27. // The application is represented using the Debuggee concept. The Debugger
  28. // service provides a way to query for available Debuggees, but does not
  29. // provide a way to create one. A debuggee is created using the Controller
  30. // service, usually by running a debugger agent with the application.
  31. //
  32. // The Debugger service enables the client to set one or more Breakpoints on a
  33. // Debuggee and collect the results of the set Breakpoints.
  34. service Debugger2 {
  35. // Sets the breakpoint to the debuggee.
  36. rpc SetBreakpoint(SetBreakpointRequest) returns (SetBreakpointResponse) {
  37. option (google.api.http) = { post: "/v2/debugger/debuggees/{debuggee_id}/breakpoints/set" body: "breakpoint" };
  38. }
  39. // Gets breakpoint information.
  40. rpc GetBreakpoint(GetBreakpointRequest) returns (GetBreakpointResponse) {
  41. option (google.api.http) = { get: "/v2/debugger/debuggees/{debuggee_id}/breakpoints/{breakpoint_id}" };
  42. }
  43. // Deletes the breakpoint from the debuggee.
  44. rpc DeleteBreakpoint(DeleteBreakpointRequest) returns (google.protobuf.Empty) {
  45. option (google.api.http) = { delete: "/v2/debugger/debuggees/{debuggee_id}/breakpoints/{breakpoint_id}" };
  46. }
  47. // Lists all breakpoints for the debuggee.
  48. rpc ListBreakpoints(ListBreakpointsRequest) returns (ListBreakpointsResponse) {
  49. option (google.api.http) = { get: "/v2/debugger/debuggees/{debuggee_id}/breakpoints" };
  50. }
  51. // Lists all the debuggees that the user can set breakpoints to.
  52. rpc ListDebuggees(ListDebuggeesRequest) returns (ListDebuggeesResponse) {
  53. option (google.api.http) = { get: "/v2/debugger/debuggees" };
  54. }
  55. }
  56. // Request to set a breakpoint
  57. message SetBreakpointRequest {
  58. // ID of the debuggee where the breakpoint is to be set.
  59. string debuggee_id = 1;
  60. // Breakpoint specification to set.
  61. // The field 'location' of the breakpoint must be set.
  62. Breakpoint breakpoint = 2;
  63. // The client version making the call.
  64. // Following: `domain/type/version` (e.g., `google.com/intellij/v1`).
  65. string client_version = 4;
  66. }
  67. // Response for setting a breakpoint.
  68. message SetBreakpointResponse {
  69. // Breakpoint resource.
  70. // The field `id` is guaranteed to be set (in addition to the echoed fileds).
  71. Breakpoint breakpoint = 1;
  72. }
  73. // Request to get breakpoint information.
  74. message GetBreakpointRequest {
  75. // ID of the debuggee whose breakpoint to get.
  76. string debuggee_id = 1;
  77. // ID of the breakpoint to get.
  78. string breakpoint_id = 2;
  79. // The client version making the call.
  80. // Following: `domain/type/version` (e.g., `google.com/intellij/v1`).
  81. string client_version = 4;
  82. }
  83. // Response for getting breakpoint information.
  84. message GetBreakpointResponse {
  85. // Complete breakpoint state.
  86. // The fields `id` and `location` are guaranteed to be set.
  87. Breakpoint breakpoint = 1;
  88. }
  89. // Request to delete a breakpoint.
  90. message DeleteBreakpointRequest {
  91. // ID of the debuggee whose breakpoint to delete.
  92. string debuggee_id = 1;
  93. // ID of the breakpoint to delete.
  94. string breakpoint_id = 2;
  95. // The client version making the call.
  96. // Following: `domain/type/version` (e.g., `google.com/intellij/v1`).
  97. string client_version = 3;
  98. }
  99. // Request to list breakpoints.
  100. message ListBreakpointsRequest {
  101. // Wrapper message for `Breakpoint.Action`. Defines a filter on the action
  102. // field of breakpoints.
  103. message BreakpointActionValue {
  104. // Only breakpoints with the specified action will pass the filter.
  105. Breakpoint.Action value = 1;
  106. }
  107. // ID of the debuggee whose breakpoints to list.
  108. string debuggee_id = 1;
  109. // When set to `true`, the response includes the list of breakpoints set by
  110. // any user. Otherwise, it includes only breakpoints set by the caller.
  111. bool include_all_users = 2;
  112. // When set to `true`, the response includes active and inactive
  113. // breakpoints. Otherwise, it includes only active breakpoints.
  114. bool include_inactive = 3;
  115. // When set, the response includes only breakpoints with the specified action.
  116. BreakpointActionValue action = 4;
  117. // When set to `true`, the response breakpoints are stripped of the
  118. // results fields: `stack_frames`, `evaluated_expressions` and
  119. // `variable_table`.
  120. bool strip_results = 5;
  121. // A wait token that, if specified, blocks the call until the breakpoints
  122. // list has changed, or a server selected timeout has expired. The value
  123. // should be set from the last response. The error code
  124. // `google.rpc.Code.ABORTED` (RPC) is returned on wait timeout, which
  125. // should be called again with the same `wait_token`.
  126. string wait_token = 6;
  127. // The client version making the call.
  128. // Following: `domain/type/version` (e.g., `google.com/intellij/v1`).
  129. string client_version = 8;
  130. }
  131. // Response for listing breakpoints.
  132. message ListBreakpointsResponse {
  133. // List of all breakpoints with complete state.
  134. // The fields `id` and `location` are guaranteed to be set on each breakpoint.
  135. repeated Breakpoint breakpoints = 1;
  136. // A wait token that can be used in the next call to `list` (REST) or
  137. // `ListBreakpoints` (RPC) to block until the list of breakpoints has changes.
  138. string next_wait_token = 2;
  139. }
  140. // Request to list debuggees.
  141. message ListDebuggeesRequest {
  142. // Project number of a Google Cloud project whose debuggees to list.
  143. string project = 2;
  144. // When set to `true`, the result includes all debuggees. Otherwise, the
  145. // result includes only debuggees that are active.
  146. bool include_inactive = 3;
  147. // The client version making the call.
  148. // Following: `domain/type/version` (e.g., `google.com/intellij/v1`).
  149. string client_version = 4;
  150. }
  151. // Response for listing debuggees.
  152. message ListDebuggeesResponse {
  153. // List of debuggees accessible to the calling user.
  154. // Note that the `description` field is the only human readable field
  155. // that should be displayed to the user.
  156. // The fields `debuggee.id` and `description` fields are guaranteed to be
  157. // set on each debuggee.
  158. repeated Debuggee debuggees = 1;
  159. }