Quick answer: .csproj <DebugType>portable</DebugType>. Or embedded for single-file deployment.

Stack trace shows method names but no line numbers. PDB not built or missing. Stack untraceable.

The Fix

<!-- MyProject.csproj -->
<Project Sdk="Godot.NET.Sdk/4.3.0">
  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
    <DebugType>portable</DebugType>
    <DebugSymbols>true</DebugSymbols>
  </PropertyGroup>
</Project>

# Build
$ dotnet build -c Debug

Portable PDB is cross-platform. Built next to DLL in bin/Debug/. Godot picks it up automatically.

Verifying

Throw an exception. Stack trace shows file:line numbers. Without PDB: unknown:0.

“DebugType portable. Lines visible.”

Related Issues

For C# net8 mismatch, see net8. For source generator, see generator.

PDB ships. Stack lines.