@@ -1443,20 +1443,14 @@ type internal FsiDynamicCompiler(
14431443
14441444 let opts = {
14451445 ilg = tcGlobals.ilg
1446- // This is not actually written, because we are writing to a stream,
1447- // but needs to be set for some logic of ilwrite to function.
14481446 outfile = multiAssemblyName + " .dll"
1449- // This is not actually written, because we embed debug info,
1450- // but needs to be set for some logic of ilwrite to function.
1451- pdbfile = ( if tcConfig.debuginfo then Some ( $" {multiAssemblyName}-{dynamicAssemblyId}.pdb" ) else None)
1447+ pdbfile = Some ( Path.Combine( scriptingDirectory.Value, $" {multiAssemblyName}-{dynamicAssemblyId}.pdb" ))
14521448 emitTailcalls = tcConfig.emitTailcalls
14531449 deterministic = tcConfig.deterministic
1454- // we always use portable for F# Interactive debug emit
14551450 portablePDB = true
14561451 embeddedPDB = false
1457- embedAllSource = true
1458- embedSourceList = tcConfig.embedSourceList
1459- // we don't add additional source files to the debug document set
1452+ embedAllSource = false
1453+ embedSourceList = []
14601454 allGivenSources = []
14611455 sourceLink = tcConfig.sourceLink
14621456 checksumAlgorithm = tcConfig.checksumAlgorithm
@@ -1470,22 +1464,14 @@ type internal FsiDynamicCompiler(
14701464 let assemblyBytes , pdbBytes = WriteILBinaryInMemory ( opts, ilxMainModule, id)
14711465
14721466 let asm =
1473- if tcConfig.debuginfo then
1474- //debug+ specified so debugging is possible, write pdb file to disk
1475- match opts.pdbfile, pdbBytes with
1476- | ( Some pdbfile), ( Some pdbBytes) ->
1477- let path = Path.Combine( scriptingDirectory.Value, pdbfile)
1478- File.WriteAllBytes( path, pdbBytes)
1479- | _ -> ()
1480-
1481- //debug+ specified so debugging is possible, write file to disk
1482- let path = Path.Combine( scriptingDirectory.Value, $" {multiAssemblyName}-{dynamicAssemblyId}.exe" )
1483- File.WriteAllBytes( path, assemblyBytes)
1484- Assembly.LoadFile( path)
1485- else
1486- match pdbBytes with
1487- | None -> Assembly.Load( assemblyBytes)
1488- | Some pdbBytes -> Assembly.Load( assemblyBytes, pdbBytes)
1467+ match opts.pdbfile, pdbBytes with
1468+ | ( Some pdbfile), ( Some pdbBytes) ->
1469+ File.WriteAllBytes( pdbfile, pdbBytes)
1470+ | _ -> ()
1471+
1472+ match pdbBytes with
1473+ | None -> Assembly.Load( assemblyBytes)
1474+ | Some pdbBytes -> Assembly.Load( assemblyBytes, pdbBytes)
14891475
14901476 // Force generated types to load
14911477 do [ for t in asm.GetTypes() -> t] |> ignore
0 commit comments