diff --git a/Lib/pdb.py b/Lib/pdb.py
index 1443f9f..bf3219a 100755
--- a/Lib/pdb.py
+++ b/Lib/pdb.py
@@ -1093,16 +1093,14 @@
         sys.settrace(None)
         globals = self.curframe.f_globals
         locals = self.curframe_locals
-        try:
-            code = compile(arg, "<string>", "exec")
-        except SyntaxError:
-            exc_info = sys.exc_info()[:2]
-            self.error(traceback.format_exception_only(*exc_info)[-1].strip())
-            return
         p = Pdb(self.completekey, self.stdin, self.stdout)
         p.prompt = "(%s) " % self.prompt.strip()
         self.message("ENTERING RECURSIVE DEBUGGER")
-        sys.call_tracing(p.run, (code, globals, locals))
+        try:
+            sys.call_tracing(p.run, (arg, globals, locals))
+        except Exception:
+            exc_info = sys.exc_info()[:2]
+            self.error(traceback.format_exception_only(*exc_info)[-1].strip())
         self.message("LEAVING RECURSIVE DEBUGGER")
         sys.settrace(self.trace_dispatch)
         self.lastcmd = p.lastcmd
diff --git a/Lib/test/test_pdb.py b/Lib/test/test_pdb.py
index 5b03b47..f573f5f 100644
--- a/Lib/test/test_pdb.py
+++ b/Lib/test/test_pdb.py
@@ -1482,12 +1482,26 @@
         stdout, _ = self._run_pdb(['-m', self.module_name + '.runme'], commands)
         self.assertTrue(any("VAR from module" in l for l in stdout.splitlines()), stdout)
 
-    def test_syntaxerror_in_command(self):
-        commands = "print(\ndebug print("
-        stdout, _ = self.run_pdb_script("", commands)
+    def test_errors_in_command(self):
+        commands = "\n".join([
+            'print(',
+            'debug print(',
+            'debug doesnotexist',
+            'c',
+        ])
+        stdout, _ = self.run_pdb_script('', commands + '\n')
+
         self.assertEqual(stdout.splitlines()[1:], [
             '(Pdb) *** SyntaxError: unexpected EOF while parsing',
-            '(Pdb) *** SyntaxError: unexpected EOF while parsing',
+
+            '(Pdb) ENTERING RECURSIVE DEBUGGER',
+            '*** SyntaxError: unexpected EOF while parsing',
+            'LEAVING RECURSIVE DEBUGGER',
+
+            '(Pdb) ENTERING RECURSIVE DEBUGGER',
+            '> <string>(1)<module>()',
+            "((Pdb)) *** NameError: name 'doesnotexist' is not defined",
+            'LEAVING RECURSIVE DEBUGGER',
             '(Pdb) ',
         ])
 
