I'm looking at stack traces generated in F#, and they are skipping functions. A test case:
let foo() =
failwithf "foo"
[<EntryPoint>]
let main argv =
foo()
0
Compiled with debug info, and run:
(torch) C:\t>fsc -g test.fs
Microsoft (R) F# Compiler version 10.8.0.0 for F# 4.7
Copyright (c) Microsoft Corporation. All Rights Reserved.
(torch) C:\t>test
Unhandled Exception: System.Exception: foo
at Microsoft.FSharp.Core.PrintfModule.PrintFormatToStringThenFail@1637.Invoke(String message)
at Test.main(String[] argv) in C:\t\test.fs:line 7
It says the exception was generated from main, with no mention of foo where it was actually generated.
How do I get the full stack trace, including the function that actually generated the exception?