SUPPORT

Some of the more common questions are answered below. However, if you have an issue that is not covered below, you can contact me directly on the Contact page.

The Niah Text Filter tool window is not visible in Visual Studio, how can I make it appear?

View | Other Windows | Niah Text Filter | Open Window.

Why does the Niah tool window disappear/resize/change position when I start or stop debugging?

This is a feature of Visual Studio. VS supports multiple window layout modes for its tool windows. When you start debugging, the layout mode changes. When the layout mode changes, VS adjusts all tool windows to the configuration for the new mode. During any window layout mode switch, tool windows will open, close, resize, or change position in order to support the new layout. Since Niah is a VS tool window, it is subject to the same rules as any other VS tool window. This means you may need to reopen the Niah window when you change window layout modes, as the Niah window may not have been previously open in this mode.

The good news is that VS will remember your preferences for that layout mode the next time it switches into it. That means when you stop debugging, VS will remember whether the Niah window was visible or hidden as well as its size and position for the next time you start debugging. VS will also remember this between VS restarts. This means you’ll only need to set up Niah once for each window layout.

To help with this issue, which can be a little confusing at first, Niah will try to open itself for you the first time you open a solution after installing Niah, and the first time you enter debug mode after installing Niah.

Niah is not showing the current operation / no output is appearing in Niah (non Unity specific).

The most common reason for this is that the Visual Studio output window is not visible. Since Niah works by essentially reading text from the VS output window, the output window must be visible in order for Niah to work properly. This is true for all operations that Niah supports – when debugging, when building, and when finding-in-files.

To open the VS output window: Debug | Windows | Output or View | Output.

Further to the above, in VS 2019 the default find-in-files result target is now the new “Find results table”. In order to use Niah with find-in-files operations, you’ll need to expand “Result options” when you initiate a find operation, and choose one of the “Find results” options instead of the table view.

Niah is not showing the current operation / no output is appearing in Niah (Unity specific).

If Unity is not connecting to Niah/Visual Studio, the most likely cause is the connection ID is invalid or different between the Unity side and the Niah/Visual Studio side. Both Niah AND your Unity code (the sample code that I provide hereneed to agree on the connection ID. To help with that, the provided C# Unity code will dump the connection ID to the Unity console on startup. Niah will also dump the connection ID that it is listening on to the output window in Visual Studio (in the “Niah Text Filter” pane). The two most likely problems are:

1. Those two connection IDs do not match. They are generated from the project folder (see GenerateConnectionIdFromProjectPath()). If you find that it does not match, you can easily change the provided C# Unity code to match what Niah is expecting.

2. The connection IDs contain an invalid character. The Microsoft documentation states that almost all characters are permitted in a pipe name, but I have found this not to be entirely true. Therefore, I am replacing non alphanumeric characters with underscores. Please let me know if you encounter this case, as I will need to update Niah to avoid invalid pipe characters.

Niah is not showing my find-in-files results in VS2017 or VS2019.

This may mean that you have the find-in-files target set to the new “Find results table” view. This feature was introduced in VS2017 and made default in VS2019. It offers some of the functionality that Niah offers, which means you may not even need Niah for find-in-files filtering. However, if you’d still like to use Niah to filter your find-in-files results, you’ll need to expand “Result options” when you initiate a find operation, and choose one of the “Find results” options instead of the table view.

Are there any performance considerations when using Niah?

Possibly; it primarily depends on two factors – how much output you’re pushing to the output window / Niah in what timeframe, and how powerful your PC is. For more clarity on the first point – Niah is capable of handling views of hundreds of thousands of lines, but if thousands of lines are traced every second, it will put a lot of strain on Niah as it creates the listview rows. To give a more concrete example, I use Niah every day on a project which generates output messages quite rapidly – 50,000+ line sessions are typical within a 5 minute session (averaging 150+ lines per second) – and it performs quite well on a 2014 era PC. I’ve done a lot of work to optimize the UI performance of Niah, but your mileage may vary based on your own situation. The good news is that you can simply try it and see if it meets your needs.

Can I improve the accuracy of the timestamps in debug output?

Yes. Niah essentially works by capturing text in the Visual Studio output window. Presumably for performance reasons, VS sends output to the output window in batches. This obviously impacts on timestamp accuracy by default. However, by using the provided sample code in your project, timestamps can be written with each output line.

This works by prepending some additional information to each output line, which Niah recognizes and consumes. For anyone on your project not using the Niah extension, they will still be able to see the debug output contents (albeit with the prepended information).

How do I enable the feature where double clicking on an output line navigates to the line that wrote it?

In order to achieve this, you need to write the file path and line number with each line, so that Niah can recognize and consume it. By using the provided sample code in your project, this additional data can be written with each output line.

This works by prepending some additional information to each output line, which Niah recognizes and consumes. For anyone on your project not using the Niah extension, they will still be able to see the debug output contents (albeit with the prepended information).

How do I enable the feature where each debug instance will be automatically filtered to a separate tree node?

In order to achieve this, you need to write the output instance process ID with each line, so that Niah can recognize and consume it. By using the provided sample code in your project, this additional data can be written with each output line.

This works by prepending some additional information to each output line, which Niah recognizes and consumes. For anyone on your project not using the Niah extension, they will still be able to see the debug output contents (albeit with the prepended information).

Are there any special requirements to use Niah with Unity?

Yes. To send output text from Unity to Visual Studio, you’ll need to integrate a small amount of extra code into your Unity project. Sample code is provided here. Feel free to use it as-is, or modify as best suits your needs.

This code requires the .Net framework version 4 or later. This version was introduced in Unity 2018.1, which means you need to be using Unity 2018.1 or later. Your project must also be built against .Net 4 rather than .Net 2.

I have a filter view that I do not want Niah to automatically remove. How can I prevent this?

Right click on the filter view in the treeview, and Pin it. Niah will not automatically delete pinned views.

Close Menu