microsoft / MIEngine

The Visual Studio MI Debug Engine ("MIEngine") provides an open-source Visual Studio Debugger extension that works with MI-enabled debuggers such as gdb and lldb.
MIT License
818 stars 218 forks source link

C++ STL containers do not printed in pretty way if attached to process #1221

Open ilqvya opened 3 years ago

ilqvya commented 3 years ago

Hi

But its ok if start the process within VS2019 directly

Here is example with std::string

Directly started: image

MI Logs: image


Attached to the process started from bash: image image

MI Logs: image

It can't parse any of stl container directly ;((

Please fix the issue

ilqvya commented 3 years ago

My linux is Centos7 and gdb version is 8.2-3.el7

ilqvya commented 3 years ago

At the same time I can view my string\vector in pretty format with Command Window With command Debug.MIDebugExec p s

image

So its a 100% MIEngine issue, not a GDB issue

ilqvya commented 3 years ago

So when it'll be fixed?

sdebionne commented 3 years ago

I think I encounter the same issue, Debug.MIDebugExec p res.background_avg does not give a pretty printed version of STL containers when the debbuger is attached. Here is my Microsoft.MIEngine.Options.xml:

<?xml version="1.0" encoding="utf-8"?>
<SupplementalLaunchOptions>
  <AttachOptions>
    <AttachOptionsForConnection>
      <SetupCommands>
        <Command IgnoreFailures="true">-enable-pretty-printing</Command>
      </SetupCommands>
    </AttachOptionsForConnection>
  </AttachOptions>
</SupplementalLaunchOptions>

@effolkronium I am debugging on a remote (ssh) Linux, I would be interested to know where to look at the MI logs?

ilqvya commented 3 years ago

Hi @sdebionne

MI Logs can be enabled with the next command: (View -> Other Windows -> Command Window) Debug.MIDebugLog /On:C:\TEST\MI.log

It'll dump logs dynamically to the file you specified like C:\TEST\MI.log

Glad to see that I'm not the only unlucky person

@WardenGnaw as u see the issue is top-priority and urgent ^^

WardenGnaw commented 3 years ago

For Visual Studio specific issues, please file a feedback ticket at https://developercommunity.visualstudio.com/report?space=8&entry=problem.

The Visual Studio Report a problem will provide us with a bunch of additional information to help us investigate this issue.

mzaglia commented 2 years ago

I have the same problem in VSCode.