[#1349] Update the default stack trace format to include values.#1350
[#1349] Update the default stack trace format to include values.#1350gareth-rees wants to merge 1 commit intomicrosoft:mainfrom
Conversation
…ues. This reduces the number of round-trips to the debugger, because when values are requested, the `-stack-list-arguments` command also returns the type of each argument immediately, avoiding the need for subsequent `-var-create` and `-var-delete` commands to get these types.
|
I believe this is going to regress the scenario fixed in #673 where the problem was that GDB could take a long time to obtain values. I wonder if Gareth's scenario could be fixed by kicking off all the |
|
I haven't had time to test it, but I created a branch to play with that kind of fix to see if it helps your scenario: https://github.com/gregg-miskelly/MIEngine/pull/new/ParallelGetTypeOfArgAsync |
|
Thanks for the link to #673, this explains why the default format excludes values. But this is surprising to me, since the GDB documentation says that
so I didn't expect that values of large objects would be printed by which means that C++ reference types ( (I doubt that parallelizing the |
|
I think it makes sense to close this PR: I will open another one if I come up with a better approach. |
Summary
This reduces the number of round-trips to the debugger, because when values are requested, the
-stack-list-argumentscommand also returns the type of each argument immediately, avoiding the need for subsequent-var-createand-var-deletecommands to get these types.Fixes #1349 (Unnecessary -var-create and -var-delete commands during a stack trace can cause noticeable pause each time the debuggee stops)
Details
I repeated the reproduction procedure from #1349, took a copy of the commands issued by a single Step Over operation with ten frames on the stack and attached them here: stack-list-arguments-after.gz. Here's a comparison of the before and after counts of commands:
-stack-list-arguments-stack-list-frames-stack-list-variables-stack-select-frame-var-create-var-deleteNotes
A side-effect of this change is that we get values in the CALL STACK window in Visual Studio Code (see screenshots below). I think this is an improvement, but since it is a big UX change you need to take it into consideration.
If this is not acceptable, let me know, and I can implement solution 2 from #1349 instead.