[IronPython] Debugging support PythonEngine

Kristof Wagemans kristof.wagemans at gmail.com
Thu Aug 17 22:53:42 CEST 2006

It's good to hear that it's fixable. But, off course, here's the next one



With the same little script:

x = 1

y = 2


def Add(a, b):

    x = a + b

    return x


z = Add(x, y)

print z



And the following C# code:

EngineOptions options = new EngineOptions();

options.ClrDebuggingEnabled = true;

PythonEngine _pe = new PythonEngine(options);


delegate int Add(int a, int b);


_pe.ExecuteFile(@"  script path   ");

Add add = _pe.EvaluateAs<Add>("Add");

int var1 = add(2, 3);

int var2 = add(3, 4); 



The following happens:

(I use a release version of Ironpython (RC2). There are no debug symbols
present, so that I don't step into the engine code.)

I step into ExecuteFile (F11) and get into native code. After a few lines of
native code, I can go back to the source code view and I'm in the Python
script file. Maybe this is a similar issue as with stepping into a function?

Next, I get a delegate to the Python Add function. The first time I step
into the add delegate I get the stepping into a function problem and then
I'm inside the function. But, when I try to step into the next add delegate
this doesn't work anymore: the line is marked in green in Visual Studio and
I remain in the C# code. The next step into command resumes on the next line
in the C# code. I can't see a reason why it would fail with the next add.
Setting a breakpoint in the Python function stops the execution at that
point in both cases.




From: users-bounces at lists.ironpython.com
[mailto:users-bounces at lists.ironpython.com] On Behalf Of Shri Borde
Sent: Thursday 17 August 2006 20:25
To: Discussion of IronPython
Subject: Re: [IronPython] Debugging support PythonEngine


I have opened this bug -
d=2248> &WorkItemId=2248 - to track the issue with stepping in. We are not
emitting any line number information for IL offset 0.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20060817/b56a9d25/attachment.html>

More information about the Ironpython-users mailing list