1 From f28dbdfaa4427c1e62c16bc6d59106f9f5db15f7 Mon Sep 17 00:00:00 2001
2 From: nosami <jasonimison@gmail.com>
3 Date: Fri, 21 Apr 2017 16:34:27 +0100
4 Subject: [PATCH] Enable JIT tracking for portable PDB debugging
6 Setting JIT tracking to true adds the `DebuggableAttribute.DebuggingModes.Default`
7 flag to the generated Debuggable attribute
8 See https://msdn.microsoft.com/en-us/library/system.diagnostics.debuggableattribute.debuggingmodes(v=vs.110).aspx
10 Without this flag I see the following message when debugging unless I have "Debug project code only: do not step into framework code" unchecked to allow stepping into framework code.
12 Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
14 Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=55092
16 src/fsharp/CompileOptions.fs | 4 ++--
17 1 file changed, 2 insertions(+), 2 deletions(-)
19 diff --git a/src/fsharp/CompileOptions.fs b/src/fsharp/CompileOptions.fs
20 index 209cdd90..97860085 100755
21 --- a/src/fsharp/CompileOptions.fs
22 +++ b/src/fsharp/CompileOptions.fs
23 @@ -466,9 +466,9 @@ let SetDebugSwitch (tcConfigB : TcConfigBuilder) (dtype : string option) (s : Op
27 - | "portable" -> tcConfigB.portablePDB <- true; tcConfigB.embeddedPDB <- false; tcConfigB.jitTracking <- false; tcConfigB.ignoreSymbolStoreSequencePoints <- true
28 + | "portable" -> tcConfigB.portablePDB <- true; tcConfigB.embeddedPDB <- false; tcConfigB.jitTracking <- true; tcConfigB.ignoreSymbolStoreSequencePoints <- true
29 | "pdbonly" -> tcConfigB.portablePDB <- false; tcConfigB.embeddedPDB <- false; tcConfigB.jitTracking <- false
30 - | "embedded" -> tcConfigB.portablePDB <- true; tcConfigB.embeddedPDB <- true; tcConfigB.jitTracking <- false; tcConfigB.ignoreSymbolStoreSequencePoints <- true
31 + | "embedded" -> tcConfigB.portablePDB <- true; tcConfigB.embeddedPDB <- true; tcConfigB.jitTracking <- true; tcConfigB.ignoreSymbolStoreSequencePoints <- true
32 | "full" -> tcConfigB.portablePDB <- false; tcConfigB.embeddedPDB <- false; tcConfigB.jitTracking <- true
33 | _ -> error(Error(FSComp.SR.optsUnrecognizedDebugType(s), rangeCmdArgs))
34 | None -> tcConfigB.portablePDB <- false; tcConfigB.embeddedPDB <- false; tcConfigB.jitTracking <- s = OptionSwitch.On;