Skip to content

Commit f1d79e8

Browse files
committed
Implemented pause-key for debug command
1 parent 342723e commit f1d79e8

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

docs/source/playbook/commands/debug.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,12 @@ purposes only.
3939
that this is an exceptional break.
4040

4141
:type: bool
42-
:default: ``True``
42+
:default: ``False``
43+
44+
.. confval:: wait_for_key
45+
46+
This setting causes the programm to pause until the user
47+
hits the enter key.
48+
49+
:type: bool
50+
:default: ``False``

src/attackmate/executors/common/debugexecutor.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ def log_command(self, command: DebugCommand):
2121
def _exec_cmd(self, command: DebugCommand) -> Result:
2222
self.setoutuptvars = False
2323
ret = 0
24+
if command.wait_for_key:
25+
self.logger.warning("Type enter to continue")
26+
input()
2427
if command.exit:
2528
ret = 1
2629

src/attackmate/schemas/debug.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ class DebugCommand(BaseCommand):
66
type: Literal['debug']
77
varstore: bool = False
88
exit: bool = False
9+
wait_for_key: bool = False
910
cmd: str = ''

0 commit comments

Comments
 (0)