Skip to content
This repository has been archived by the owner on Dec 8, 2018. It is now read-only.

DeveloperExceptionPage does not show line numbers in stack trace #372

Closed
DamianEdwards opened this issue May 3, 2017 · 18 comments
Closed
Assignees

Comments

@DamianEdwards
Copy link
Member

DamianEdwards commented May 3, 2017

Using 2.0.0-preview1 bits:

  • Microsoft.AspNetCore.Diagnostics 2.0.0-preview1-24820 (via Microsoft.AspNetCore.All)
  • Microsoft.NETCore.App 2.0.0-preview1-002101-00

Throw a runtime exception during request processing, e.g. in an inline middleware, in a Controller action, in a Razor view/page, and the exception page displays but the stack trace contains no line numbers:

System.Exception: middleware
   at RazorPagesSample.Startup.<>c.<Configure>b__8_0(HttpContext context)
   at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.<Invoke>d__7.MoveNext()
@DamianEdwards
Copy link
Member Author

@NTaylorMullen
Copy link
Member

-_- This has been regressed so many times. We seriously need to have end-to-end functional tests validating this.

@pranavkm
Copy link
Contributor

pranavkm commented May 3, 2017

Well, apparently this is a known issue: aspnet/Mvc#6120.

@NTaylorMullen
Copy link
Member

NTaylorMullen commented May 4, 2017

Investigated this guy. Looks like there's a core clr issue with StackFrame that broke from netcoreapp1.1 => netcoreapp2.0. Filed an issue here.

Could use an external label 😄

@Eilon
Copy link
Member

Eilon commented May 4, 2017

We can keep this issue here at least to track.

@muratg
Copy link

muratg commented May 4, 2017

@Eilon we keep this in preview1 or move out? (and close if CoreCLR issue gets fixed)

@Eilon
Copy link
Member

Eilon commented May 4, 2017

Can keep it here for now until we at least find out what the conclusion is on the .NET side.

@lt72
Copy link

lt72 commented May 4, 2017

This should now be fixed in CoreFX with dotnet/corefx#19364.

@Eilon
Copy link
Member

Eilon commented May 5, 2017

@lt72 thanks!

@Eilon
Copy link
Member

Eilon commented May 9, 2017

@NTaylorMullen - can you confirm we're seeing the right thing on the latest build of the CLI that I sent out?

@NTaylorMullen
Copy link
Member

Verified by doing dotnet new -t mvc and throwing an exception in the HomeController:
image

All looks good!

@pranavkm
Copy link
Contributor

pranavkm commented May 9, 2017

Can you unskip aspnet/Mvc#6120?

@kichalla
Copy link
Member

This issue resurfaced again in the mirror, probably because the corefx team merged their commits from preview1(where it regressed) to dev(where it was working when @NTaylorMullen unskipped this).

@kichalla
Copy link
Member

This has been fixed. https://github.com/dotnet/corefx/issues/19838

@NTaylorMullen
Copy link
Member

This has been regressed again for net461 apps. Re-opened the corefx issue: https://github.com/dotnet/corefx/issues/19838

@NTaylorMullen NTaylorMullen reopened this Jun 2, 2017
@pranavkm
Copy link
Contributor

pranavkm commented Jun 2, 2017

Do we need to revive this - dotnet/extensions@31a4622?

@NTaylorMullen
Copy link
Member

Yup, opened this issue.

To work around this issue for those watching you can add this to your csproj:

<DebugType Condition="'$(TargetFrameworkIdentifier)'=='.NETFramework'">Full</DebugType>

@NTaylorMullen
Copy link
Member

NTaylorMullen commented Jun 2, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants