diff --git a/core/src/main/java/org/teavm/backend/javascript/rendering/AstWriter.java b/core/src/main/java/org/teavm/backend/javascript/rendering/AstWriter.java index 3399e4022..3661a4131 100644 --- a/core/src/main/java/org/teavm/backend/javascript/rendering/AstWriter.java +++ b/core/src/main/java/org/teavm/backend/javascript/rendering/AstWriter.java @@ -291,6 +291,9 @@ public class AstWriter { case Token.WHILE: print((WhileLoop) node); break; + case Token.DEBUGGER: + writer.append("debugger;"); + break; default: if (node instanceof InfixExpression) { printInfix((InfixExpression) node, precedence); diff --git a/core/src/test/java/org/teavm/backend/javascript/rendering/AstWriterTest.java b/core/src/test/java/org/teavm/backend/javascript/rendering/AstWriterTest.java index f163b9b95..ab9779020 100644 --- a/core/src/test/java/org/teavm/backend/javascript/rendering/AstWriterTest.java +++ b/core/src/test/java/org/teavm/backend/javascript/rendering/AstWriterTest.java @@ -255,6 +255,11 @@ public class AstWriterTest { assertEquals("delete a.b;", transform("delete a.b;")); } + @Test + public void writesDebugger() throws IOException { + assertEquals("debugger;debugger;", transform("debugger; debugger;")); + } + @Test public void writesGlobalRef() throws IOException { assertEquals(