Author Topic: Display std::string content directly in debugger  (Read 2209 times)

jmfrouin

  • Senior Community Member
  • Posts: 103
  • Hero Points: 2
Display std::string content directly in debugger
« on: August 18, 2017, 09:05:01 AM »
Hi,
It is possible to improve debugger to see the content of std::string directly ?
For the moment I need to use c_str() method to display the content for all std::string I watch
Thanks

Dennis

  • Senior Community Member
  • Posts: 3961
  • Hero Points: 517
Re: Display std::string content directly in debugger
« Reply #1 on: August 18, 2017, 04:26:16 PM »
This works with the GDB debugger integration (though it uses GDB's Python pretty printing interface to do it, so well, it works as well as GDB works).  Debug > Debugger Options... > GDB Options > Enable Python pretty printing > ON.

There is no support for this built into the LLDB debugger or WinDBG.  We do have plans to provide a mechanism within Slickedit for pretty-printing variables (which would allow us to abandon GDB's horrid implemention).

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: Display std::string content directly in debugger
« Reply #2 on: August 18, 2017, 08:38:46 PM »
Good plan and good luck Dennis !
Surely not that simple - a number of debuggers don't support pretty STL.
That would be nice :)
HS2

jmfrouin

  • Senior Community Member
  • Posts: 103
  • Hero Points: 2
Re: Display std::string content directly in debugger
« Reply #3 on: August 19, 2017, 06:25:02 AM »
Hi,
Yes I use LLDB for the moment.
Good luck for implementation and thanks to take time to answer all threads/questions :)
Best regards,