diff --git a/gdb-port/commands.py b/gdb-port/commands.py
index 1c7702a97dcbc8ed154f8b158be988f924fe445e..b35000d39b122dfa3c0c2f1209857c4bbca60a1e 100644
--- a/gdb-port/commands.py
+++ b/gdb-port/commands.py
@@ -255,24 +255,60 @@ class HammerParseApply(FlowControlWithPrint):
 		print(":: hammer-parse-apply")
 
 	def invoke(self, arg, from_tty):
-		#profiler = cProfile.Profile() # DEBUG
-		#profiler.enable() # DEBUG
-		with cProfile.Profile() as profiler: # DEBUG
+		##profiler = cProfile.Profile() # DEBUG
+		##profiler.enable() # DEBUG
+		#with cProfile.Profile() as profiler: # DEBUG
+		if True:
 			top_level_parse.setup_ast_stack_index(0) #TODO: is it a problem if this command overwrites it? would it better to use a convenience variable, as with parse-step?
+			showmap_old = top_level_parse.show_input_map_after_apply
+			top_level_parse.show_input_map_after_apply = False
 
 			# HDoParseRetBreakpoint sets hammer_step_counter to 1 after capturing the AST subtree, so this will stop at the first h_do_parse invocation afterwards
 			if gdb.selected_inferior().pid > 0:
 				gdb.execute("continue")
 
+			top_level_parse.show_input_map_after_apply = showmap_old
 			top_level_parse.clear_ast_stack_index()
 
 			self.conditionally_print_backtrace()
-		profiler.print_stats(sort='tottime') # DEBUG
-		#profiler.disable() # DEBUG
-		#s = io.StringIO() # DEBUG
-		#sortby = SortKey.CUMULATIVE # DEBUG
-		#ps = pstats.Stats(pr, stream=s).sort_stats(sortby) # DEBUG
-		#ps.print_stats() # DEBUG
-		#print(s.getvalue()) # DEBUG
+		#profiler.print_stats(sort='tottime') # DEBUG
+		##profiler.disable() # DEBUG
+		##s = io.StringIO() # DEBUG
+		##sortby = SortKey.CUMULATIVE # DEBUG
+		##ps = pstats.Stats(pr, stream=s).sort_stats(sortby) # DEBUG
+		##ps.print_stats() # DEBUG
+		##print(s.getvalue()) # DEBUG
 
 HammerParseApply()
+
+class HammerParseApplyAndShowAST(FlowControlWithPrint):
+	def __init__(self):
+		super(HammerParseApplyAndShowAST, self).__init__("hammer-parse-apply-and-show-ast", gdb.COMMAND_OBSCURE)
+		print(":: hammer-parse-apply-and-show-ast")
+
+	def invoke(self, arg, from_tty):
+		##profiler = cProfile.Profile() # DEBUG
+		##profiler.enable() # DEBUG
+		#with cProfile.Profile() as profiler: # DEBUG
+		if True:
+			top_level_parse.setup_ast_stack_index(0) #TODO: is it a problem if this command overwrites it? would it better to use a convenience variable, as with parse-step?
+			showmap_old = top_level_parse.show_input_map_after_apply
+			top_level_parse.show_input_map_after_apply = True
+
+			# HDoParseRetBreakpoint sets hammer_step_counter to 1 after capturing the AST subtree, so this will stop at the first h_do_parse invocation afterwards
+			if gdb.selected_inferior().pid > 0:
+				gdb.execute("continue")
+
+			top_level_parse.show_input_map_after_apply = showmap_old
+			top_level_parse.clear_ast_stack_index()
+
+			self.conditionally_print_backtrace()
+		#profiler.print_stats(sort='tottime') # DEBUG
+		##profiler.disable() # DEBUG
+		##s = io.StringIO() # DEBUG
+		##sortby = SortKey.CUMULATIVE # DEBUG
+		##ps = pstats.Stats(pr, stream=s).sort_stats(sortby) # DEBUG
+		##ps.print_stats() # DEBUG
+		##print(s.getvalue()) # DEBUG
+
+HammerParseApplyAndShowAST()