Load More Stack Frames strange behavior
- VSCode Version: Version 1.0.0-alpha Commit 6ea1266160aa9eb3ed6e71a5099bec3952090037
- OS Version: Ubuntu 14.04
Steps to Reproduce:
- Compile https://gist.github.com/edumunoz/6e2ca90d4b5d3dbfa5340576e79ac113 with
g++ -g -std=c++11 -pthread hello.cpp -o hello - Install the C++ debug adapter
- Set a breakpoint in line 17 from the gist
- Have the main thread expanded in the callstack viewlet
- Expand another thread and click on a frame for which no source is available
- The "Load More Stack Frames" button appears for the main thread
- The "Load More Stack Frames" button is clicked, the callstack for the main thread gets duplicated (two
main()in the screenshot)
Step 3

Step 5

Step 6

I understand if the debug adapter implements the "Load More Frames" feature, this will work. However the experience seems kind of weird if the debug adapter doesn't implement the feature (like C++ debug adapter as of now).
@isidorn @weinand
@edumunoz that is strange, the Load More Stack Frames action should not appear if an adapter is not implementing it. What does the C++ adapter return for the stackTrace request total frames attribute. If the adapter does not support this the action should not be shown at all.
In short, if the adapter does not support this it should not return the totalFrames. If the C++ does not return totalFrames attribute and this action still appears then it a bug on the vscode side and I will investigate deeper.
The C++ extension does not include a totalFrames attribute in the StackTraceResponse.
Let me know if there is an easy way to turn on logging on the messages sent and received by VSCode to the debug adapter.
Nice catch. The issue was connected with #4623 in that a thread thought it's callstack length was a callStack length of some other thread. Fixed this by always respecting what the debug adapter says about the totalFrames, so if they are not supported this will not be possible. Will not look into the other bug...
Verified this is fixed for cpptools in master.
Adding the verified tag then.