Ensure stopped on goto changes focus (#1668)

* Ensure stopped on goto changes focus

* Test fix
This commit is contained in:
Karthik Nadig 2019-08-08 17:27:34 -07:00 committed by GitHub
parent f6d04ea0c7
commit 81ac055f3f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -303,7 +303,7 @@ class NetCommandFactoryJson(NetCommandFactory):
threadId=thread_id,
text=exc_name,
allThreadsStopped=True,
preserveFocusHint=stop_reason not in ['step', 'exception', 'breakpoint', 'entry'],
preserveFocusHint=stop_reason not in ['step', 'exception', 'breakpoint', 'entry', 'goto'],
)
event = pydevd_schema.StoppedEvent(body)
return NetCommand(CMD_THREAD_SUSPEND_SINGLE_NOTIFICATION, 0, event, is_json=True)

View file

@ -675,7 +675,7 @@ class DebugSession(object):
assert thread_stopped.body['allThreadsStopped']
assert thread_stopped.body['preserveFocusHint'] == \
(thread_stopped.body['reason'] not in ['step', 'exception', 'breakpoint', 'entry'])
(thread_stopped.body['reason'] not in ['step', 'exception', 'breakpoint', 'entry', 'goto'])
assert tid is not None