-
Notifications
You must be signed in to change notification settings - Fork 687
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Breakpoint not hit in cshtml file. #1816
Comments
This is because ASP.NET is compiling your view optimized and/or without PDBs. Though I am not sure why. @BillHiebert do you by chance know what controls this, or have you heard of this problem? |
I'm not certain what I can provide here that will help. We always generate a |
@rynowak I debugged it, and the problem is that a non-portable PDB is being generated. Do you know what selects portable vs. Windows? |
Razor respects the project's settings - and the defaults for the project are set based on the tfm. So if this is netcoreapp20 you get portable by default. I believe this snippet does full pdbs
|
@rynowak the behavior you are describing is what I would expect, but NOT what I am seeing. When I try this in a Here is the project file: <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" />
</ItemGroup>
</Project> |
@pranavkm - can you take a look at this please? |
@gregg-miskelly, @rynowak - what is the value of the DebugType property. It should be set to portable. Here's the setting from Microsoft.net.sdk.targets; |
Hi all,
The DebugType was set to "portable" in the project. Appended below.
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<DebugType>portable</DebugType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer"
Version="2.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools"
Version="2.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet"
Version="2.0.0" />
<PackageReference
Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference
Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" />
<DotNetCliToolReference
Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="2.0.0" />
</ItemGroup>
</Project>
Ken Han
Mobile: +61 (0) 430 817 085
Email: [email protected]
…On 31 October 2017 at 08:02, BillHiebert ***@***.***> wrote:
Sorry, forgot about markdoen.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1816 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ALkRUO89Yls8rO3V97kWrNkaCJ9UYxr3ks5sxjlZgaJpZM4QJyRy>
.
|
Looks like a bug in Mvc. On desktop, we always attempt to produce full pdbs if the pdb writer component is installed (typically installed with VS). It doesn't attempt to read the project's pdb setting. Unfortunately there really isn't a good way for a user to override or specify the pdb kind to produce. I filed aspnet/Mvc#7006 to track fixing this. |
@pranavkm Thanks! I will resolve this issue as external then. |
Environment data
dotnet --info
output:.NET Command Line Tools (2.0.2)
Product Information:
Version: 2.0.2
Commit SHA-1 hash: a04b4bf512
Runtime Environment:
OS Name: Windows
OS Version: 10.0.15063
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.0.2\
Microsoft .NET Core Shared Framework Host
Version : 2.0.0
Build : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d
VS Code version: 1.17.2
C# Extension version: 1.12.1
Steps to reproduce
Open the attached proejct
EFCoreWebDemo.zip in Visual Studio Code,
Point a breakpoint at file ...Program.cs, line 17: BuildWebHost(args).Run();
Point a breakpoint at file ...\Views\Authors\Index.cshtml, line 9:
Both breakpoints are enabled.
Start the Debug via Debug -> Start Debugging
After the debug process fully initialized, only the breakpoint at Program.cs got hit, the one in Index.cshtml got dimmed out with the message "No symbols have been loaded for this document."
Expected behavior
Both breakpoints should get hit.
Actual behavior
the one in Index.cshtml got dimmed out with the message "No symbols have been loaded for this document."
The text was updated successfully, but these errors were encountered: