PTVS icon indicating copy to clipboard operation
PTVS copied to clipboard

VS 2022 Native (GDB) debugging with Python pretty-printers: watch/popup does not show object's structure

Open vsfeedback opened this issue 1 year ago • 3 comments

This issue has been moved from a ticket on Developer Community.


[severity:It’s more difficult to complete my work]
I have a Linux process running under WSL, and I debug it from Visual Studio 2022 using Native (GDB) option. The source files, symbols, etc. is available to VS; breakpoints work OK. Python pretty printers are enabled in GDB, and proper Microsoft.MIEngine.Options.xml is in the VS solution’s directory; the pretty printers work in VS IDE.

The problem is: I see inner structure of all objects, except those that have pretty printers. For those latter, I only see the string returned by the pretty printers, and no way to expand them to see the undecorated inner structure. I need to be able to expand those objects, too; and see an item like [Raw View] available when debugging Windows native processes with a natvis file.

This is how an OUString object looks when debugging a Windows native process, with a custom natvis file:

image.png

This is how the same object looks, when debugging a Linux process with GDB pretty printers:

image.png

See that there is no way to expand the popup.

This is how the same process debugging works with pretty printers disabled (Microsoft.MIEngine.Options.xml removed):

image.png

The inner structure is shown, but no pretty printing makes is uncomfortable.


Original Comments

Feedback Bot on 11/2/2023, 05:34 PM:

(private comment, text removed)


Original Solutions

(no solutions)

vsfeedback avatar Nov 08 '23 19:11 vsfeedback

image image image

StellaHuang95 avatar Nov 08 '23 20:11 StellaHuang95

Just a question: is PTVS related to Python pretty-printers executed in GDB when debugging C++ project?

mikekaganski avatar Nov 09 '23 04:11 mikekaganski

@AdamYoblick @int19h Do you the answer to this?

StellaHuang95 avatar Nov 13 '23 18:11 StellaHuang95