ANSI Debugger Visualizer is a Visual Studio Debugger Visualizer that renders ANSI escape sequences directly within the debugging environment, displaying formatted text as it would appear in a console.
This visualizer was initially developed to streamline the testing and validation of ANSI-rendered output in CLI projects based on Spectre.Console. When using ApprovalTests.Net for unit testing, validating the "approved" file can be cumbersome.
With this visualizer, you can:
- Run the test in debug mode.
- See the ANSI-rendered output directly in Visual Studio.
- Manually confirm if the output matches expectations before approving the received file as the new reference.
Of course, this visualizer can be useful for any scenario involving ANSI-formatted strings.
To install the ANSI Debugger Visualizer :
- Copy the DLL into the appropriate Visualizers directory for your Visual Studio version.
- Restart Visual Studio.
Note:
- Default installation path for Visual Studio 2022 (64 bits)
C:\Program Files\Microsoft Visual Studio\2022\<YourEdition>\Common7\Packages\Debugger\Visualizers
- Default installation path for Visual Studio 2019 / 2017 (32 bits)
C:\Program Files (x86)\Microsoft Visual Studio\<Year>\<YourEdition>\Common7\Packages\Debugger\Visualizers
where :
- <YourEdition> is
Community,ProfessionalorEnterprise - <Year> is
2019or2017
Once installed, the ANSI Debugger Visualizer will be available when debugging a string variable containing ANSI escape sequences.
- Run your application in Debug mode.
- Hover over a string variable that contains ANSI-formatted text.
- Click on the magnifying glass icon 🔍 to open the visualizer.
- The rendered output will be displayed as if in a terminal.
These images illustrates how select the visualizer and how the visualizer renders ANSI sequences directly in the debugging window.
Contributions, issues, and feature requests are welcome! Feel free to open an issue or submit a pull request.

