I have a Xamarin.Forms project that uses a .Net Standard shared component. I鈥檓 using Windows 10 RS4 (17134) with Visual Studio 2017 v15.7.1. I can hit breakpoints I set in the UWP code but I can鈥檛 get it to hit breakpoints I set on the .Net Standard share code. Following the instructions below does not fix the issue. I tried this on multiple machines and also with just a sample project that uses .Net Standard and the issue reproes across all these scenarios. Is this known? Is there a workaround?
I also encountered this problem on a project.
Looking from where Visual Studio get the pdbs ("Debug > Windows > Modules" during debugging), I found that the pdbs are not searched in the right folder.
I have for the moment added an xcopy command in the post build event of the project.
It's perhaps the same problem here.
I ran into this too. Try changing the property of the UWP project. Build -> Advanced (button at bottom) ->Debugging Information = Full.
Also, check your .Net Standard project and see that it's set to PDB-only.
I read somewhere that somehow the template was changed accidentally or something.
@StephaneDelcroix as far as I know, you cannot change this through the Visual Studio front end. You have to directly edit your csproj file. I've had this problem before. Here is an example of how to fix it:
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<DebugType>pdbonly</DebugType>
</PropertyGroup>
@StephaneDelcroix it seems to be a known issue, but all the related issues seem to have been closed...
I don't know if anyone is planning on actually fixing it...
@MelbourneDeveloper, @powerdude, @kvpt : thanks for those information, it's helpful
Hello,
I have the same problem here. Had to select "PDB only" in project's properties.
@MelbourneDeveloper you can change the option by selecting the project -> Properties -> Build -> Advanced -> Debugging information the select "Pdb-only"
@PureWeen is this related to the fix you pushed a few days ago ?
@StephaneDelcroix In the context of the Control Gallery project it is. UWP break points weren't working in Xamarin.Forms.Core when running Control Gallery so I added the <DebugType>full</DebugType>
for DEBUG configurations
But the changes I made don't really effect anything beyond running the Control Gallery itself in debug mode.
It looks like the new templates for VS will just be including this by default for the Xam Forms projects so that's nice.
I solved issue by adding below code
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>full</DebugType>
<DebugSymbols>true</DebugSymbols>
Most helpful comment
I ran into this too. Try changing the property of the UWP project. Build -> Advanced (button at bottom) ->Debugging Information = Full.
Also, check your .Net Standard project and see that it's set to PDB-only.
I read somewhere that somehow the template was changed accidentally or something.