diff --git a/lib/debug/client.rb b/lib/debug/client.rb index ee32b238b..056dd5cd0 100644 --- a/lib/debug/client.rb +++ b/lib/debug/client.rb @@ -173,6 +173,8 @@ def send msg end def connect + pre_commands = (CONFIG[:commands] || '').split(';;') + trap(:SIGINT){ send "pause" } @@ -199,7 +201,12 @@ def connect prev_trap = trap(:SIGINT, 'DEFAULT') begin - line = readline + if pre_commands.empty? + line = readline + else + line = pre_commands.shift + puts "(rdbg:remote:command) #{line}" + end rescue Interrupt retry ensure