Yes, this is true in the debugger in general and not just for IronPython. You have to step back to a managed function after hitting the Break.<br><br>
<div class="gmail_quote">On Sun, Jan 31, 2010 at 2:35 PM, Jeff Hardy <span dir="ltr"><<a href="mailto:jdhardy@gmail.com">jdhardy@gmail.com</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Hmm, this is only an issue when using<br>System.Diagnostics.Debugger.Break(); as soon as I hit F10 all of the<br>
variables become available.<br><font color="#888888"><br>- Jeff<br></font>
<div>
<div></div>
<div class="h5"><br>On Sun, Jan 31, 2010 at 3:11 PM, Jeff Hardy <<a href="mailto:jdhardy@gmail.com">jdhardy@gmail.com</a>> wrote:<br>> Hi,<br>> When debugging Python code with Visual Studio, I'm getting 'Cannot<br>
> evaluate expression because the code of the current method is<br>> optimized.' for just about everything when trying to inspect Python<br>> objects, even when running with -X:Debug. This is with IronPython 2.6.<br>
><br>> I remember this working at some point in the past, so I'm wondering if<br>> there is something else I need to do (like a different -X: switch) to<br>> be able to view the values on those objects.<br>
><br>> - Jeff<br>><br>_______________________________________________<br>Users mailing list<br><a href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</a><br><a href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target="_blank">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a><br>
</div></div></blockquote></div><br>