From 193baee9867e567eda4475fdafe2485b0348bd46 Mon Sep 17 00:00:00 2001 From: Rafael Laverde Date: Tue, 29 Aug 2017 18:56:17 -0500 Subject: [PATCH] Don't run continue when starting debug if there is a breakpoint in the first line with code. --- spyder/plugins/editor.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/spyder/plugins/editor.py b/spyder/plugins/editor.py index 35ad8183a87..9d859bd1961 100644 --- a/spyder/plugins/editor.py +++ b/spyder/plugins/editor.py @@ -2403,8 +2403,13 @@ def debug_file(self): self.run_file(debug=True) # Fixes 2034 editor = self.get_current_editor() - if editor.get_breakpoints(): + breakpoints = editor.get_breakpoints() + if breakpoints: time.sleep(0.5) + if editor.get_cursor_line_number() == breakpoints[0][0]: + # Not need to execute any code because the first breakpoint + # is set in the first line with code + return self.debug_command('continue') @Slot()