I can't readily remember where I read it, but my understanding of inline was that it is "switched off" (except for statically resolving type constraints) during debug builds. But it isn't, a breakpoint on an inline member is never hit and stepping into is not possible.
Since there is a (slight) semantic difference between using inline and not using it, perhaps this is the reason that inlining is also enforced in debug builds? For inline functions that I do want to investigate during debugging I currently use something like this:
Original code:
type CE =
static member inline map f = CE.bind (f >> Some) // line is never hit
Updated code
type CE =
static member
#if !DEBUG
inline
#endif
map f =
CE.bind (f >> Some) // gets hit now when debugging
While this works, it is ugly. Is there another possibility, i.e. with a compiler switch or attribute, to turn this on/off, or is that asking for too much trouble (i.e. the earlier mentioned statically resolved type parameters, and perhaps the auto-inlining of user-defined operators).
Note: my primary use-case is actually not debugging per se, but hit-counting of the functions or members, and in lieu of that, code-coverage reports.
Using F# 4.0, .NET 4.5 and Visual Studio 2015.