Skip to content

Tracking Compiler debuggability improvements #13424

Open
@vzarytovskii

Description

@vzarytovskii

Note
This is a "meta" issue for tracking purposes, since GitHub does not support special types of issues.

During a compiler debugging session with @dsyme, we've identified a few points which need improvements:

  • reqdTy (may TType instances) is showed as solved with no information, show solution when possible (possibly, show solution depth).

  • NOTE: range's ToString will go to the filesystem and read the file. We can also reduce the text (10 characters?)

  • Debugger is slow expanding object with bunch of properties (for example TType).

  • Search codebase for ToString, have them consistent (having a simple string representing the type).

  • Putting .ToString() with simpler info, consistently across types, rather than type name to:

    • TyparFlags
    • XmlDoc
    • CallerArg
    • CalledArg
    • AssignedCalledArg
    • cenv, TcEnv (inconsistent ToString()), TcGlobals, TcImports, TcState
    • DispayEnv, NameResolutionEnv should deliver a simple string, instead of %A
    • AccessorDomain, AccessibleFrom, CompPath - simpler ToString().
    • ... review types of MethodCalls.fs.
    • Review all of Syn* types.
    • Review test framework ToStrings (e.g. CompilationSource and CompilationUnit).
  • Consider putting DebuggerStepThrough (helps debugging experience by not stepping into functions/methods), DebuggerHidden (hide stack frames) or DebuggerNonUserCode.

    • We need to review current compiler stacktraces and remove higher-order functions, for example:
      • DiagnosticLogger.fs - TryD, MapD, MapD.loop, MapCombineTDC2D, MapCombineTDCD StackGuard.Guard and others.
      • ConstraintSolver - CollectThenUndoOrCommit
  • Consider adding NonUserCode to the library functions (like map, fold, etc.)? This may complicate debugging FSharp.Core itself.

  • Consider using DebuggerHidden and/or NonUserCode on StartWithContinuationsUsingDispatchInfo, StartWithContinuations and StartImmediate.

  • Make _FullList null if the length is <= ListDebugViewMaxLength:

    [<DebuggerBrowsable(DebuggerBrowsableState.Collapsed)>]
            member x._FullList = items (count l 0 ListDebugViewMaxFullLength)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Planned

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions