graphical-debugging-vscode icon indicating copy to clipboard operation
graphical-debugging-vscode copied to clipboard

loading... takes forever with cppvsdbg

Open fleafffb opened this issue 3 years ago • 5 comments

well, title says it all: after hitting a break-point it takes at least half a minute until the results are displayed

fleafffb avatar Mar 02 '22 08:03 fleafffb

Right now the memory is not accessed directly. All of the elements of a container are parsed from strings returned by the debugger. What are you trying to visualize? How many elements does it have?

awulkiew avatar Mar 02 '22 09:03 awulkiew

It was just for testing a simple std::vector test (1024)

fleafffb avatar Mar 02 '22 09:03 fleafffb

any idea why this takes so long?

fleafffb avatar Mar 02 '22 10:03 fleafffb

Because for each element of the vector custom expression is evaluated. An obvious solution is to load the memory like it is done in the extension for VS. There are building blocks for that implemented but I wanted the extension to work for various types first (even if this is slow). For other languages than C++ I don't know what could be done. Maybe it would be possible to replace expression evaluation with accessing members with the vscode debugger api but I don't know if this would be faster.

awulkiew avatar Mar 02 '22 11:03 awulkiew

For reference, for me loading of std::vector<int> containing 1024 elements takes 7s with GDB and 10s with LLDB on Ubuntu. AFAIR with msdbg on Windows it's faster. Are the times similar for you?

awulkiew avatar Mar 28 '23 17:03 awulkiew