简体   繁体   中英

Cannot debug Service Fabric

I have a statesless Service Fabric service

I am deploying it within my application into a 1 node dev cluster

None of my breakpoints ever get hit

I have rebuilt, restarted, updated visual studio and I am now really out of ideas

Has anyone ever seen this?

The strange thing is that my breakpoints stay active

I know my logic is being executed as messages are shown in the console

Paul

Linking the answer in the comments

https://stackoverflow.com/a/42118286/5946937

  1. Close all Visual Studio windows.
  2. Restart the Service Fabric service: Type services.msc in the windows run tool. Find Microsoft Service Fabric Host Service. Right Click + Restart.
  3. Reset the local cluster: Look at the Service Fabric Local Cluster Manager Icon in the notification area in the right side of the task bar. Right Click + Reset Local Cluster.
  4. Open the problematic solution in Visual Studio.
  5. Clean and Rebuild solution.
  6. Finally run your solution (press F5).

There is one other thing that I noticed. After pressing an F5, on the process tab, keep an eye on the process id 在此处输入图像描述 (this is just a sample reference, not from a service fabric process), in my case, there were no processes attached at all. In such a case, go to Debug -> Attach to Process -> Choose the process you need to debug. 在此处输入图像描述 One thing to keep in mind is that sometimes you may have to select the show process from all users checkbox because visual studio may be running in admin mode but the application process maybe running in normal user mode. 在此处输入图像描述

You can also understand that the right process has not been attached when you see something like this在此处输入图像描述 in front of the breakpoint. This is also an indication that the right process has not been attached. If the right process has been attached, the debugging should be successful!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM