diff options
author | Googler <noreply@google.com> | 2018-05-04 08:37:22 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-05-04 08:38:41 -0700 |
commit | 30eb98352a00095b0e41e2272563a967f3117fc2 (patch) | |
tree | 67ecc7ae1f11c585ecb1f010a87aacfb18b54377 | |
parent | f384ab5855ba230e7767b7b5350bd72ef01b9a1b (diff) |
Skylark debugging proto changes.
- add 'start debugging' request/response messages. The debug server will
block until this request is received, allowing the client to perform
initial setup (e.g. setting breakpoints)
- support conditional breakpoints
- add a column index to the Location message
- rename 'line number' to 'line index', and specify that it's 0-based
PiperOrigin-RevId: 195420363
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skylarkdebug/proto/skylark_debugging.proto | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skylarkdebug/proto/skylark_debugging.proto b/src/main/java/com/google/devtools/build/lib/skylarkdebug/proto/skylark_debugging.proto index 591eb5512a..e9bd422ac8 100644 --- a/src/main/java/com/google/devtools/build/lib/skylarkdebug/proto/skylark_debugging.proto +++ b/src/main/java/com/google/devtools/build/lib/skylarkdebug/proto/skylark_debugging.proto @@ -34,6 +34,7 @@ message DebugRequest { ContinueExecutionRequest continue_execution = 102; EvaluateRequest evaluate = 103; ListFramesRequest list_frames = 104; + StartDebuggingRequest start_debugging = 105; } } @@ -77,6 +78,12 @@ message ListFramesRequest { int64 thread_id = 1; } +// A request to begin the debugging session. Skylark execution will block until +// this request is made, to allow initial setup after the connection is +// established (e.g. setting breakpoints). +message StartDebuggingRequest { +} + // There are two kinds of events: "responses", which correspond to a // DebugRequest sent by the client, and other asynchronous events that may be // sent by the server to notify the client of activity in the Skylark code being @@ -96,6 +103,7 @@ message DebugEvent { ContinueExecutionResponse continue_execution = 102; EvaluateResponse evaluate = 103; ListFramesResponse list_frames = 104; + StartDebuggingResponse start_debugging = 105; ThreadStartedEvent thread_started = 1000; ThreadEndedEvent thread_ended = 1001; @@ -138,6 +146,10 @@ message ListFramesResponse { repeated Frame frame = 1; } +// The response to a StartDebuggingRequest. +message StartDebuggingResponse { +} + // An event indicating that a thread has begun executing Skylark code. message ThreadStartedEvent { // The thread that began. @@ -168,6 +180,10 @@ message Breakpoint { // A breakpoint that is triggered when a particular line is reached. Location location = 1; } + // An optional condition for the breakpoint. When present, the breakpoint will + // be triggered iff both the primary condition holds and this expression + // evaluates to True. + string expression = 2; } // A single frame in a thread's stack trace. @@ -187,8 +203,11 @@ message Location { // The path of the Skylark source file. string path = 1; - // A line number in the file denoted by path. - uint32 line_number = 2; + // A 0-based line index in the file denoted by path. + uint32 line_index = 2; + + // A 0-based column index in the file denoted by path. + uint32 column_index = 3; } // A scope that contains value bindings accessible in a frame. |