views:

47

answers:

1

I'm using VS2008 with F# integration (April 2010 Community Technology Preview)

When I declare a normal variable, e.g.

let x = 4

then x will show up in the Local debug window when I set a breakpoint

However, if I use a mutable variable

let mutable x = 4

then x will not appear in the same window

Any advice?

+3  A: 

I don't think it's that simple. In any case, in my experience, the 'top level' debugging experience is often not as good as debugging withing functions, so e.g. if you have ten lines of code at the top level, change it to

let Main() =
    // your 10 lines of code
Main()

and the debugging experience may improve.

Brian
This seems to be the case. If I refactor this out into a function, mutable variables now appear.