Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR: Don't run continue when starting debug if there is a breakpoint in the first line with code. #5086

Merged
merged 1 commit into from
Aug 31, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion spyder/plugins/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down