Don't request strack trace if the thread isn't stopped

This commit is contained in:
Ben Jackson 2020-11-28 00:17:42 +00:00
commit e15c50a4f4
2 changed files with 10 additions and 5 deletions

View file

@ -237,12 +237,17 @@ class StackTraceView( object ):
elif stoppedThreadId is not None and thread.id == stoppedThreadId: elif stoppedThreadId is not None and thread.id == stoppedThreadId:
thread.Paused( stopEvent ) thread.Paused( stopEvent )
# If this is a stopped event, load the stack trace for the "current"
# thread. Don't do this on other thrads requests because some servers
# just break when that happens.
if infer_current_frame: if infer_current_frame:
if thread.id == self._current_thread: if thread.id == self._current_thread:
if thread.CanExpand():
self._LoadStackTrace( thread, True, reason ) self._LoadStackTrace( thread, True, reason )
requesting = True requesting = True
elif self._current_thread is None: elif self._current_thread is None:
self._current_thread = thread.id self._current_thread = thread.id
if thread.CanExpand():
self._LoadStackTrace( thread, True, reason ) self._LoadStackTrace( thread, True, reason )
requesting = True requesting = True

View file

@ -1,7 +1,7 @@
{ {
"configurations": { "configurations": {
"simple_c_program - Launch": { "simple_c_program - Launch": {
"adapter": "vscode-cpptools", "adapter": "CodeLLDB",
"configuration": { "configuration": {
"request": "launch", "request": "launch",
"program": "${workspaceRoot}/test", "program": "${workspaceRoot}/test",