Debug NCache Providers in Visual Studio
In case you wish to debug the providers for NCache like ReadThru
, WriteThru
, CacheLoader
, you can do so by attaching the NCache Service to the application. This enables run time debugging through the standard debugging commands.
Important
The provider must be built in Debug mode. Debugging will not be enabled for projects built in Release configuration.
Insert a breakpoint in your application from where you want to debug.
From the menu bar click on Debug and select Attach to Process... option as shown below.
- Select
Alachisoft.NCache.CacheHost.exe
in Processes.
Make sure that options Show processes from all users and Show processes in all sessions are selected.
Click Attach.
Any operation now being performed over NCache will throw a hit in the debug code, allowing in depth debugging of the feature.
Important
For more detail on attaching processes with various configurations to debug, please refer to this MSDN help.