microsoft / PTVS

Python Tools for Visual Studio
https://aka.ms/PTVS
Apache License 2.0
2.53k stars 677 forks source link

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

Open vsfeedback opened 11 months ago

vsfeedback commented 11 months ago

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)

StellaHuang95 commented 11 months ago

image image image

mikekaganski commented 11 months ago

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

StellaHuang95 commented 10 months ago

@AdamYoblick @int19h Do you the answer to this?