[IronPython] 'Cannot evaluate expression because the code of the current method is optimized.' when debugging IronPython 2.6

Curt Hagenlocher curt at hagenlocher.org
Sun Jan 31 23:54:02 CET 2010


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.

On Sun, Jan 31, 2010 at 2:35 PM, Jeff Hardy <jdhardy at gmail.com> wrote:

> Hmm, this is only an issue when using
> System.Diagnostics.Debugger.Break(); as soon as I hit F10 all of the
> variables become available.
>
> - Jeff
>
> On Sun, Jan 31, 2010 at 3:11 PM, Jeff Hardy <jdhardy at gmail.com> wrote:
> > Hi,
> > When debugging Python code with Visual Studio, I'm getting 'Cannot
> > evaluate expression because the code of the current method is
> > optimized.' for just about everything when trying to inspect Python
> > objects, even when running with -X:Debug. This is with IronPython 2.6.
> >
> > I remember this working at some point in the past, so I'm wondering if
> > there is something else I need to do (like a different -X: switch) to
> > be able to view the values on those objects.
> >
> > - Jeff
> >
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20100131/4ef30a94/attachment.html>


More information about the Ironpython-users mailing list