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">&lt;<a href="mailto:jdhardy@gmail.com">jdhardy@gmail.com</a>&gt;</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 &lt;<a href="mailto:jdhardy@gmail.com">jdhardy@gmail.com</a>&gt; wrote:<br>&gt; Hi,<br>&gt; When debugging Python code with Visual Studio, I&#39;m getting &#39;Cannot<br>
&gt; evaluate expression because the code of the current method is<br>&gt; optimized.&#39; for just about everything when trying to inspect Python<br>&gt; objects, even when running with -X:Debug. This is with IronPython 2.6.<br>
&gt;<br>&gt; I remember this working at some point in the past, so I&#39;m wondering if<br>&gt; there is something else I need to do (like a different -X: switch) to<br>&gt; be able to view the values on those objects.<br>
&gt;<br>&gt; - Jeff<br>&gt;<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>