aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/skylarkdebug
diff options
context:
space:
mode:
authorGravatar brendandouglas <brendandouglas@google.com>2018-06-14 06:30:58 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-06-14 06:32:18 -0700
commita9faeffebb11780fedb26cf64f4c8e74bd80ee39 (patch)
tree2275548674ba1bc70a4f994ce7319f4b19e20559 /src/test/java/com/google/devtools/build/lib/skylarkdebug
parent93fe20ce350e813caa53049a97f04014e0169df3 (diff)
Skylark debugging protocol: remove conditional breakpoints, don't include frames in thread paused events.
I started implementing conditional breakpoints server-side in unknown commit, but: - client-side implementations seem more common in debugging protocols - IntelliJ in particular has great support for client-side conditional breakpoints, but poor support for server-side - it's unnecessary extra complexity for the server -- simple line breakpoints + evaluation requests already give us conditional bps. Also removing frames from thread paused events. It results in poor performance for stepping and pausing (in which we get frame info for potentially dozens of threads), and again isn't usual for debuggers. Finally, ignore breakpoints when performing a client-requested evaluation. PiperOrigin-RevId: 200547972
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/skylarkdebug')
-rw-r--r--src/test/java/com/google/devtools/build/lib/skylarkdebug/server/SkylarkDebugServerTest.java16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/skylarkdebug/server/SkylarkDebugServerTest.java b/src/test/java/com/google/devtools/build/lib/skylarkdebug/server/SkylarkDebugServerTest.java
index a0b4eefc43..f85a24ed8e 100644
--- a/src/test/java/com/google/devtools/build/lib/skylarkdebug/server/SkylarkDebugServerTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skylarkdebug/server/SkylarkDebugServerTest.java
@@ -171,13 +171,7 @@ public class SkylarkDebugServerTest {
.setThreadPausedState(
ThreadPausedState.newBuilder()
.setPauseReason(PauseReason.ALL_THREADS_PAUSED)
- .setLocation(expectedLocation)
- .addFrame(
- Frame.newBuilder()
- .setFunctionName("<top level>")
- .setLocation(expectedLocation)
- .addScope(Scope.newBuilder().setName("global"))
- .build()))
+ .setLocation(expectedLocation))
.build());
sendStartDebuggingRequest();
@@ -217,12 +211,7 @@ public class SkylarkDebugServerTest {
.setThreadPausedState(
ThreadPausedState.newBuilder()
.setPauseReason(PauseReason.HIT_BREAKPOINT)
- .setLocation(breakpoint.toBuilder().setColumnNumber(1))
- .addFrame(
- Frame.newBuilder()
- .setFunctionName("<top level>")
- .setLocation(breakpoint.toBuilder().setColumnNumber(1))
- .addScope(Scope.newBuilder().setName("global"))))
+ .setLocation(breakpoint.toBuilder().setColumnNumber(1)))
.build();
assertThat(client.unnumberedEvents)
@@ -449,7 +438,6 @@ public class SkylarkDebugServerTest {
ThreadPausedState pausedState = threads.getThread(0).getThreadPausedState();
assertThat(pausedState.getPauseReason()).isEqualTo(PauseReason.STEPPING);
assertThat(pausedState.getLocation()).isEqualTo(expectedLocation);
- assertThat(pausedState.getFrameCount()).isEqualTo(2);
}
@Test