Roslyn has a capability to emit special debug information for C#/VB async methods.
F# doesn't emit this information. This means we must, in some way, be missing out on a debug capability supported by .NET debugging.
Portable PDB spec is here: https://github.com/dotnet/runtime/blob/main/docs/design/specs/PortablePdb-Metadata.md
Also aplies to "StateMachine Local Scopes"
https://github.com/dotnet/roslyn/blob/3d8acbd585a75e9cdb3509623bf6c39ceb46b2c2/src/Compilers/Core/Portable/PEWriter/MetadataWriter.PortablePdb.cs
Here's an example of what they emit: https://github.com/dotnet/roslyn/blob/3d8acbd585a75e9cdb3509623bf6c39ceb46b2c2/src/Compilers/Core/Portable/PEWriter/MetadataWriter.PortablePdb.cs
private void SerializeAsyncMethodSteppingInfo(AsyncMoveNextBodyDebugInfo asyncInfo, MethodDefinitionHandle moveNextMethod, int aggregateMethodDefRid)
{
Debug.Assert(asyncInfo.ResumeOffsets.Length == asyncInfo.YieldOffsets.Length);
Debug.Assert(asyncInfo.CatchHandlerOffset >= -1);
var writer = new BlobBuilder();
writer.WriteUInt32((uint)((long)asyncInfo.CatchHandlerOffset + 1));
for (int i = 0; i < asyncInfo.ResumeOffsets.Length; i++)
{
writer.WriteUInt32((uint)asyncInfo.YieldOffsets[i]);
writer.WriteUInt32((uint)asyncInfo.ResumeOffsets[i]);
writer.WriteCompressedInteger(aggregateMethodDefRid);
}
_debugMetadataOpt.AddCustomDebugInformation(
parent: moveNextMethod,
kind: _debugMetadataOpt.GetOrAddGuid(PortableCustomDebugInfoKinds.AsyncMethodSteppingInformationBlob),
value: _debugMetadataOpt.GetOrAddBlob(writer));
}
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4