diff --git a/plugins/org.eclipse.epsilon.eol.dap/src/org/eclipse/epsilon/eol/dap/EpsilonDebugAdapter.java b/plugins/org.eclipse.epsilon.eol.dap/src/org/eclipse/epsilon/eol/dap/EpsilonDebugAdapter.java index 9cbc3e05f..6841c245a 100644 --- a/plugins/org.eclipse.epsilon.eol.dap/src/org/eclipse/epsilon/eol/dap/EpsilonDebugAdapter.java +++ b/plugins/org.eclipse.epsilon.eol.dap/src/org/eclipse/epsilon/eol/dap/EpsilonDebugAdapter.java @@ -539,7 +539,9 @@ public CompletableFuture attach(Map args) { synchronized(this) { // If this is the first time we're attaching to the module... if (this.suspendedState == null) { - this.stopAtEveryStatement = "true".equals(args.get(STOP_AT_EVERY_STATEMENT)); + // We accept both the "true" string and a Boolean true value + Object argStop = args.get(STOP_AT_EVERY_STATEMENT); + this.stopAtEveryStatement = "true".equals(argStop) || Boolean.TRUE.equals(argStop); // Prepare the suspended state suspendedState = new SuspendedState(); diff --git a/tests/org.eclipse.epsilon.eol.dap.test/src/org/eclipse/epsilon/eol/dap/test/egl/EglDebugTest.java b/tests/org.eclipse.epsilon.eol.dap.test/src/org/eclipse/epsilon/eol/dap/test/egl/EglDebugTest.java index be47ad59f..5768f5ed2 100644 --- a/tests/org.eclipse.epsilon.eol.dap.test/src/org/eclipse/epsilon/eol/dap/test/egl/EglDebugTest.java +++ b/tests/org.eclipse.epsilon.eol.dap.test/src/org/eclipse/epsilon/eol/dap/test/egl/EglDebugTest.java @@ -134,12 +134,21 @@ public void defaultAndInlineBreakpoints() throws Exception { } @Test - public void stopAtAllStatements() throws Exception { + public void stopAtAllStatementsString() throws Exception { + testStopAtEveryStatement("true"); + } + + @Test + public void stopAtAllStatementsBoolean() throws Exception { + testStopAtEveryStatement(true); + } + + private void testStopAtEveryStatement(final Object argStop) throws Exception { SetBreakpointsResponse stopResult = adapter.setBreakpoints(createBreakpoints(createBreakpoint(2))).get(); assertTrue("The breakpoint at line 2 was verified", stopResult.getBreakpoints()[0].isVerified()); // Attach with the "stop at every statement" option turned on - attach(Collections.singletonMap(EpsilonDebugAdapter.STOP_AT_EVERY_STATEMENT, "true")); + attach(Collections.singletonMap(EpsilonDebugAdapter.STOP_AT_EVERY_STATEMENT, argStop)); // Break on the first static region of line 2 assertStoppedBecauseOf(StoppedEventArgumentsReason.BREAKPOINT);