简体   繁体   中英

Can't debug indirectly referenced project (Visual Studio 2015 Update 3)

I have the following setup: My solution has 3 projects, project A (a Xamarin.Android project) references project B (a PLC), and project B referenced project C (also a PLC). When i debug project A, all breakpoints in project C are ignored, and if i want to step into a method from project C (called from project B), it simply steps over it.

If i directly reference project C from project A and don't change anything else, it works perfectly, but i don't want project A to be aware of project C.

I also tried to delete all bin and obj folders, as well as all .suo an .user files, and removing and adding the references again, it didn't help.

This definitely worked before, but i recently updated to Update 3 of Visual Studio 2015 because i ran into annoying bug in Update 2 that was fixed in Update 3. I'm not entirely sure that's the reason why it doesn't work anymore, but i can't think of anything else.

have no idea why, but it works again. I wanted to make the screenshots and stuff Jack wanted, and it suddenly worked. And i don't know what it is that changed, since i changed "nothing", but we all know these "i didn't do anything", so i guess there was something, but no idea what, since i had given up on the matter for the time being and didn't continue trying to fix it... I think all i did was adding a direct reference from A to C to debug an issue and then removing it again after the issue was fixed. Sorry for the trouble i caused.

Glad to know that it works well now even if we didn't find the real reason, but I provide the possible reason why it has this issue or some troubleshooting steps for community members who have the same issue.

Generally for breakpoint not hit issue:

(1) We have to make sure that the symbols was really loaded from the debug mode window, for example, maybe you will get the warning like No PDB or not loaded from the Output window. So we need to enable the Microsoft Symbols Server under TOOLS->Options->Debugging->Servers.

(2)Another possible reason is that the reference projects don't use the same Platform Target like the .NET Framework version or the debug target X86/X64/Any CPU.

(3) Or it is related to the file path, I mean that Generally the Debug loaded the assembly files from the project output path, we have to make sure that it really has this assembly files there(Maybe not copy or require the admin).

Anyway, since it works well now, I just post the possible reasons. Have a nice day.

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