         result, "original", "beautified")
       addInfo('Original vs. Beautified Diff', "\n```#{codeBlockSyntax}\n#{diff}\n```")
 
-      addInfo('Logs', "\n```\n#{logs}\n```")
+      addHeader(3, "Logs")
+      addInfo(null, "```\n#{logs}\n```")
+
+      # Build Table of Contents
+      toc = "## Table Of Contents\n"
+      for header in headers
+        ###
+        - Heading 1
+          - Heading 1.1
+        ###
+        indent = "  " # 2 spaces
+        bullet = "-"
+        indentNum = header.level - 2
+        if indentNum >= 0
+          toc += ("#{Array(indentNum+1).join(indent)}#{bullet} [#{header.title}](\##{linkifyTitle(header.title)})\n")
+      # Replace TABLEOFCONTENTS
+      debugInfo = debugInfo.replace(tocEl, toc)
 
       # Save to clipboard
       atom.clipboard.write(debugInfo)


  # Contents
  codeBlockSyntax = (language?.name ? grammarName).toLowerCase().split(' ')[0]
  addInfo('Original File Contents', "\n```#{codeBlockSyntax}\n#{text}\n```")

  addInfo('Package Settings', "\n" +
  "The raw package settings options\n" +
  "```json\n#{JSON.stringify(atom.config.get('atom-beautify'), undefined, 4)}\n```")

  # Beautification Options
  addHeader(2, "Beautification options")

    "```json\n#{JSON.stringify(preTransformedOptions, undefined, 4)}\n```")
    if selectedBeautifier
      addHeader(3, 'Final Options')
      addInfo(null,
        "Final combined and transformed options that are used\n" +
        "```json\n#{JSON.stringify(finalOptions, undefined, 4)}\n```")

    #
    logs = ""
