Table of Contents

Text visualizers

Text visualizers is a feature of Visual Studio allowing to view textual data more conveniently. Some variables of various string types have long values which are truncated when displayed in single row of the variable or watch view. You can view full text of the variable in a separate window by activating the text visualizer.

In order to do this, select the variable to view and click on the small arrow button next to the "magnifying glass" icon. The icon is available for suitable variables having string types, e.g. char*, std::string, etc. When you click, you can select one of the visualizers provided by Visual Studio: plain string, XML or HTML. After selecting the visualizer you can view the variable text. (Caution: when the text is not correct XML or HTML and you select particular visualizer, VisualStudio will display an error. Use the plain text visualizer in such case).

Enabling visualization for custom types

The text visualizer icon is available for text-typed variables. But how Visual Studio know which variable type holds text? WinGDB has a configuration file for that, which you can customize when default type set does not include all the types you are using. The file is located in the WinGDB installation directory, e.g.:

C:\Program Files (x86)\SoftErg\WinGDB\Visualizers\textVisualizers.cfg

The file contains regular expressions matched against type name. Each line contains single regular expression. You can add your own regular expressions to the file. Be careful for syntax, as incorrect expressions will be ignored. WinGDB will print a warning to the session log in such case.

Table of Contents


Copyright (C) 2008-2016 SOFT-ERG. All rights reserved.