Closed bersbersbers closed 4 years ago
And here's the crash output with the old PTVSD:
: Canceled
Traceback (most recent call last):
File "c:\Users\bers\.vscode\extensions\ms-python.python-2020.3.62694-dev\pythonFiles\ptvsd_launcher.py", line 48, in <module>
main(ptvsdArgs)
File "c:\Users\bers\.vscode\extensions\ms-python.python-2020.3.62694-dev\pythonFiles\lib\python\old_ptvsd\ptvsd\__main__.py", line 432, in main
run()
File "c:\Users\bers\.vscode\extensions\ms-python.python-2020.3.62694-dev\pythonFiles\lib\python\old_ptvsd\ptvsd\__main__.py", line 316, in run_file
runpy.run_path(target, run_name='__main__')
File "C:\Users\bers\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 263, in run_path
return _run_module_code(code, init_globals, run_name,
File "C:\Users\bers\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 96, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "C:\Users\bers\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "c:\Work\bug.py", line 8, in <module>
pass # Method 1: set a manual breakpoint here; leads to crash
File "c:\Work\bug.py", line 8, in <module>
pass # Method 1: set a manual breakpoint here; leads to crash
File "c:\Users\bers\.vscode\extensions\ms-python.python-2020.3.62694-dev\pythonFiles\lib\python\old_ptvsd\ptvsd\_vendored\pydevd\_pydevd_bundle\pydevd_frame.py", line 606, in trace_dispatch
self.do_wait_suspend(thread, frame, event, arg)
File "c:\Users\bers\.vscode\extensions\ms-python.python-2020.3.62694-dev\pythonFiles\lib\python\old_ptvsd\ptvsd\_vendored\pydevd\_pydevd_bundle\pydevd_frame.py", line 97, in do_wait_suspend
self._args[0].do_wait_suspend(*args, **kwargs)
File "c:\Users\bers\.vscode\extensions\ms-python.python-2020.3.62694-dev\pythonFiles\lib\python\old_ptvsd\ptvsd\_vendored\pydevd\pydevd.py", line 1616, in do_wait_suspend
keep_suspended = self._do_wait_suspend(thread, frame, event, arg, suspend_type, from_this_thread, frames_tracker)
File "c:\Users\bers\.vscode\extensions\ms-python.python-2020.3.62694-dev\pythonFiles\lib\python\old_ptvsd\ptvsd\_vendored\pydevd\pydevd.py", line 1644, in _do_wait_suspend
self.process_internal_commands()
File "c:\Users\bers\.vscode\extensions\ms-python.python-2020.3.62694-dev\pythonFiles\lib\python\old_ptvsd\ptvsd\_vendored\pydevd\pydevd.py", line 1350, in process_internal_commands
int_cmd.do_it(self)
File "c:\Users\bers\.vscode\extensions\ms-python.python-2020.3.62694-dev\pythonFiles\lib\python\old_ptvsd\ptvsd\_vendored\pydevd\_pydevd_bundle\pydevd_comm.py", line 502, in do_it
self.method(dbg, *self.args, **self.kwargs)
File "c:\Users\bers\.vscode\extensions\ms-python.python-2020.3.62694-dev\pythonFiles\lib\python\old_ptvsd\ptvsd\_vendored\pydevd\_pydevd_bundle\pydevd_comm.py", line 675, in internal_get_variable_json
for child_var in variable.get_children_variables(fmt=fmt):
File "c:\Users\bers\.vscode\extensions\ms-python.python-2020.3.62694-dev\pythonFiles\lib\python\old_ptvsd\ptvsd\_vendored\pydevd\_pydevd_bundle\pydevd_suspended_frames.py", line 111, in get_children_variables
lst = resolver.get_contents_debug_adapter_protocol(self.value, fmt=fmt)
File "c:\Users\bers\.vscode\extensions\ms-python.python-2020.3.62694-dev\pythonFiles\lib\python\old_ptvsd\ptvsd\_vendored\pydevd\_pydevd_bundle\pydevd_resolver.py", line 95, in get_contents_debug_adapter_protocol
dct, used___dict__ = self._get_py_dictionary(obj)
File "c:\Users\bers\.vscode\extensions\ms-python.python-2020.3.62694-dev\pythonFiles\lib\python\old_ptvsd\ptvsd\_vendored\pydevd\_pydevd_bundle\pydevd_resolver.py", line 192, in _get_py_dictionary
names, used___dict__ = self.get_names(var)
File "c:\Users\bers\.vscode\extensions\ms-python.python-2020.3.62694-dev\pythonFiles\lib\python\old_ptvsd\ptvsd\_vendored\pydevd\_pydevd_bundle\pydevd_resolver.py", line 174, in get_names
if hasattr(var, '__dict__'):
TypeError: descriptor '__dict__' for '_OxmlElementBase' objects doesn't apply to a 'CT_Placeholder' object
This looks like #2076 strikes again. A fix is already in the works!
Environment data
Actual behavior
I am not sure this is PTVSD's issue, or VSCode-Python's, or VS Code's, pyhton-pptx', or even Python's. But I have to start somewhere, and my naive assumption is that PTVSD should catch any crashed while inspecting variables.
Anyway, upon debugging below code, issuing "el" correctly yields
in the Debug Console. Clicking
>
to expand the element leads to a crash (Method 1) or an infinitely rotating throbber (Method 2). This is the output for the crash:Expected behavior
The element should be expanded as much as possible, catching exceptions along the way.
Steps to reproduce:
This is my launch configuration:
And this my code. Note there's two way to set a breakpoint, with different results. In both cases, upon hitting the breakpoint, issue
el
in the Debug Console, then click>
to expand the result.