I am developing a background service in .NET 6. The service runs just fine and does its thing. I wanted to profile a timer callback in use to see if it was leaking memory. When I run the profiler, I use the Windows Service option and it just says starting application and never profiles. The service is running, I can see it in the services window, and I can see the logs it generates in the event viewer. Any way to fix the profiler?
Comments
1 comment
-
You might want to check if the profiler has the right permissions to attach to the service process. Since background services often run under different user accounts (like Local System), the profiler may not be able to hook into them properly. Try running the profiler as an administrator and double-check that your service is running in the same session or user context. Also, make sure any antivirus or security software isn't interfering with the attachment process.
Add comment
Please sign in to leave a comment.