From b6e83df4bb4046abdc8d5a7f2cb01cd350038c7f Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Thu, 4 Apr 2019 16:10:42 -0700 Subject: [PATCH] Set correct reason when stopped on 'goto' (#1316) --- src/ptvsd/wrapper.py | 2 ++ tests/func/test_step.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ptvsd/wrapper.py b/src/ptvsd/wrapper.py index a526f477..49f95b69 100644 --- a/src/ptvsd/wrapper.py +++ b/src/ptvsd/wrapper.py @@ -1820,6 +1820,8 @@ class VSCodeMessageProcessor(VSCLifecycleMsgProcessor): reason = 'exception' elif reason == pydevd_comm.CMD_SET_BREAK: reason = 'breakpoint' + elif reason == pydevd_comm.CMD_SET_NEXT_STATEMENT: + reason = 'goto' else: reason = 'pause' diff --git a/tests/func/test_step.py b/tests/func/test_step.py index 54ce2cee..00340743 100644 --- a/tests/func/test_step.py +++ b/tests/func/test_step.py @@ -80,7 +80,7 @@ def test_set_next_statement(pyfile, run_as, start_method): session.wait_for_next(Event('continued')) - stop = session.wait_for_thread_stopped() + stop = session.wait_for_thread_stopped(reason='goto') frames = stop.stacktrace.body['stackFrames'] line = frames[0]['line'] assert line == line_numbers['inner2']