mirror of
https://github.com/microsoft/debugpy.git
synced 2025-12-23 08:48:12 +00:00
Fixes some bugs with just-my-code (#727)
* Continue if the suspended in debugger code * Get more info via exception description * More logging * Add a check for site-packages * Remove debug logs and cleanup * Fix tests * Fix more test bugs * more cleanup
This commit is contained in:
parent
f726968304
commit
522e9f1ce4
4 changed files with 11 additions and 10 deletions
|
|
@ -1397,13 +1397,13 @@ class VSCodeMessageProcessor(VSCLifecycleMsgProcessor):
|
|||
vendored_pydevd = os.path.sep + \
|
||||
os.path.join('ptvsd', '_vendored', 'pydevd')
|
||||
ptvsd_path = os.path.sep + 'ptvsd'
|
||||
site_path = os.path.sep + 'site-packages'
|
||||
|
||||
project_dirs = []
|
||||
for path in sys.path + [os.getcwd()]:
|
||||
is_stdlib = False
|
||||
norm_path = os.path.normcase(path)
|
||||
if path.endswith(ptvsd_path) or \
|
||||
path.endswith(vendored_pydevd):
|
||||
if path.endswith((ptvsd_path, vendored_pydevd, site_path)):
|
||||
is_stdlib = True
|
||||
else:
|
||||
for prefix in STDLIB_PATH_PREFIXES:
|
||||
|
|
@ -2301,7 +2301,8 @@ class VSCodeMessageProcessor(VSCLifecycleMsgProcessor):
|
|||
xframe = xframes[0]
|
||||
filepath = unquote(xframe['file'])
|
||||
if reason in STEP_REASONS or reason in EXCEPTION_REASONS:
|
||||
if not self._should_debug(filepath):
|
||||
if self.internals_filter.is_internal_path(filepath) or \
|
||||
not self._should_debug(filepath):
|
||||
self.pydevd_notify(pydevd_comm.CMD_THREAD_RUN, pyd_tid)
|
||||
return
|
||||
|
||||
|
|
|
|||
|
|
@ -908,7 +908,7 @@ class VSCTest(object):
|
|||
expected = list(self.vsc.protocol.parse_each(expected))
|
||||
self.assertEqual(received[:-1], expected)
|
||||
|
||||
failure = received[-1]
|
||||
failure = received[-1] if len(received) > 0 else []
|
||||
expected = self.vsc.protocol.parse(
|
||||
self.fix.vsc_msgs.new_failure(req, failure.message))
|
||||
self.assertEqual(failure, expected)
|
||||
|
|
|
|||
|
|
@ -30,13 +30,13 @@ def _get_project_dirs():
|
|||
vendored_pydevd = os.path.sep + \
|
||||
os.path.join('ptvsd', '_vendored', 'pydevd')
|
||||
ptvsd_path = os.path.sep + 'ptvsd'
|
||||
site_path = os.path.sep + 'site-packages'
|
||||
|
||||
project_dirs = []
|
||||
for path in sys.path + [os.getcwd()]:
|
||||
is_stdlib = False
|
||||
norm_path = os.path.normcase(path)
|
||||
if path.endswith(ptvsd_path) or \
|
||||
path.endswith(vendored_pydevd):
|
||||
if path.endswith((ptvsd_path, vendored_pydevd, site_path)):
|
||||
is_stdlib = True
|
||||
else:
|
||||
for prefix in ptvsd.wrapper.STDLIB_PATH_PREFIXES:
|
||||
|
|
|
|||
|
|
@ -378,7 +378,7 @@ class FlaskLaunchFileTests(WebFrameworkTests):
|
|||
'FLASK_ENV': 'development',
|
||||
'FLASK_DEBUG': '0',
|
||||
'LC_ALL': 'C.UTF-8',
|
||||
'LANG': 'C.UTF-8'
|
||||
'LANG': 'C.UTF-8',
|
||||
},
|
||||
cwd=cwd),
|
||||
framework='Jinja',
|
||||
|
|
@ -399,7 +399,7 @@ class FlaskLaunchFileTests(WebFrameworkTests):
|
|||
'FLASK_ENV': 'development',
|
||||
'FLASK_DEBUG': '0',
|
||||
'LC_ALL': 'C.UTF-8',
|
||||
'LANG': 'C.UTF-8'
|
||||
'LANG': 'C.UTF-8',
|
||||
},
|
||||
cwd=cwd),
|
||||
framework='Jinja',
|
||||
|
|
@ -418,7 +418,7 @@ class FlaskLaunchFileTests(WebFrameworkTests):
|
|||
'FLASK_ENV': 'development',
|
||||
'FLASK_DEBUG': '0',
|
||||
'LC_ALL': 'C.UTF-8',
|
||||
'LANG': 'C.UTF-8'
|
||||
'LANG': 'C.UTF-8',
|
||||
},
|
||||
cwd=cwd), 'Jinja', filename)
|
||||
|
||||
|
|
@ -434,7 +434,7 @@ class FlaskLaunchFileTests(WebFrameworkTests):
|
|||
'FLASK_ENV': 'development',
|
||||
'FLASK_DEBUG': '0',
|
||||
'LC_ALL': 'C.UTF-8',
|
||||
'LANG': 'C.UTF-8'
|
||||
'LANG': 'C.UTF-8',
|
||||
},
|
||||
cwd=cwd), 'Jinja', filename)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue