0

when I debug ABP Framework templates, the breakpoint never hit. I tryed 2 projects below:

BookStore-Blazor-EfCore in https://github.com/PacktPublishing/Mastering-ABP-Framework

ApiDemo in https://github.com/abpframework/abp-samples

Both set breakpoint at the beginning of main function of the project and set it as startup project.

For ApiDemo.HttpApi.Host project, after I rebuild and start it by press F5, the breakpoint says "The breakpoint will not currently be hit. No Symbols have been loaded for this document.", the symbol status in modules window show "Cannot find or open the PDB file.",user code also show No. If I load the symbol file in the same folder manually it says "A matching symbol file was not found in this folder".

Cound you share any advises for me?

I guess it's caused by vs compile setting and can't produce correct PDB file, but I can debug other non-ABP solutions.

Auzout
  • 31
  • 4

2 Answers2

1

Fixed by set project propertie=>Build=>General=>Debug symbols=>PDB file, current platform.

Auzout
  • 31
  • 4
0

There seems to be some deviation between your description and reality, ApiDemo.HttpApi.Host is in the first repo you provided, not the second one.

In addition, I cloned the project you mentioned to the local, and tried to debug breakpoints. I haven't encountered the situation you mentioned, and I can reach the breakpoint normally.

From the error report, it can be seen that the pdb file used for debugging is not found, please check whether the pdb file does not exist in the specified directory.

If it does not exist, please try to rebuild your entire solution; or close VS, enter your solution root directory to delete the .vs folder, and then restart VS:

enter image description here

Bowman Zhu-MSFT
  • 4,776
  • 1
  • 9
  • 10
  • Thanks, I solved it myself. I have tried many ways including upgrade vs and reset all settings. The only way is to set Debug symbol as current platform. – Auzout Mar 22 '23 at 10:00