'Line numbers in dotnet-stack report

With dotnet-stack report -p <pid> I can see the stack traces, but I don't see the line numbers. Is it possible to display line numbers (like jstack does)? Is there an alternative?



Solution 1:[1]

Try adding the following properties to csproj files:

  <PropertyGroup>
    <DebugSymbols>true</DebugSymbols>
    <DebugType>embedded</DebugType>

    <!-- The following is to fix error line numbers mismatch -->
    <Optimize>false</Optimize>
  </PropertyGroup>

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 aleksander_si