Try Playground
Show / Hide Table of Contents

Debug Read-through/Write-through/Write-behind in Visual Studio

If you wish to debug the providers for NCache like ReadThru, WriteThru, and WriteBehind, you can do so by attaching the NCache Service to the application. This approach enables run-time debugging through the standard debugging commands. Attaching to a process allows you to debug applications or components that run outside of Visual Studio, such as services or background tasks, and offers full control to inspect the program state at runtime.

Important
  • You must build the provider (Read-through/Write-through/Write-behind) in debug mode, as debugging is not enabled for projects created with a release configuration.
  • Cache host processes for .NET 6 and above are called Alachisoft.NCache.CacheHost.exe and dotnet.exe for .NET.

Steps to Debug NCache Data Providers (Read-through/Write-through/Write-behind) in Visual Studio

  • Open Task Manager and go to the Details tab where processes running on your system are listed.

  • Depending upon the number of caches running on the node, select the appropriate cache. Right click on any column header within the Details tab (e.g., Name, PID, etc.) and choose Select columns.

  • A dialog box will appear, enable the Command line column so it is visible in the Details tab.

Command-Line Dialog Box

  • After selecting the appropriate cache host process from the available options, you can move to your application and attach the provider with the appropriate cache.

  • Note the PID for the cache host process against which you want to debug the provider.

  • Open Visual Studio, from the top menu bar click on Debug tab and select Attach to Process... option as shown below.

Debug NCache Providers in Visual Studio

  • The following screen appears, ensure that the Show processes for all users option is selected.

  • Select dotnet.exe or Alachisoft.NCache.CacheHost.exe in Process with the same PID you want to debug.

Select Assembly in Process

  • Click Attach.

  • In your application, insert a breakpoint from where you want to debug. Now, any operation being performed over NCache will throw an exception in the debug code allowing you to inspect and debug the flow of data in a clear and structured way.

By following the steps above, you can effectively debug NCache Providers in Visual Studio. This will enable you to examine and troubleshoot processes in real-time for improved problem solving.

Important

For further detail on attaching processes with various configurations to debug, please refer to Microsoft documentation.

See Also

Read-through
Write-through/Write-behind
Loader and Refresher

In This Article
  • Steps to Debug NCache Data Providers (Read-through/Write-through/Write-behind) in Visual Studio
  • See Also

Contact Us

PHONE

+1 (214) 764-6933   (US)

+44 20 7993 8327   (UK)

 
EMAIL

sales@alachisoft.com

support@alachisoft.com

NCache
  • NCache Enterprise
  • NCache Professional
  • Edition Comparison
  • NCache Architecture
  • Benchmarks
Download
Pricing
Try Playground

Deployments
  • Cloud (SaaS & Software)
  • On-Premises
  • Kubernetes
  • Docker
Technical Use Cases
  • ASP.NET Sessions
  • ASP.NET Core Sessions
  • Pub/Sub Messaging
  • Real-Time ASP.NET SignalR
  • Internet of Things (IoT)
  • NoSQL Database
  • Stream Processing
  • Microservices
Resources
  • Magazine Articles
  • Third-Party Articles
  • Articles
  • Videos
  • Whitepapers
  • Shows
  • Talks
  • Blogs
  • Docs
Customer Case Studies
  • Testimonials
  • Customers
Support
  • Schedule a Demo
  • Forum (Google Groups)
  • Tips
Company
  • Leadership
  • Partners
  • News
  • Events
  • Careers
Contact Us

  • EnglishChinese (Simplified)FrenchGermanItalianJapaneseKoreanPortugueseSpanish

  • Contact Us
  •  
  • Sitemap
  •  
  • Terms of Use
  •  
  • Privacy Policy
© Copyright Alachisoft 2002 - 2025. All rights reserved. NCache is a registered trademark of Diyatech Corp.
Back to top