[IronPython] IronPython.Hosting.EngineOptions.ClrDebuggingEnabled in IronPython 2.0 Beta 3

Joshua Peterson petersonjm1 at gmail.com
Mon Jul 21 15:58:08 CEST 2008


I'm working with a C# application that hosts IronPython 2.0 Beta 3.  I would
like to be able to use the IronPython integration sample that ships with the
Visual Studio 2005 SDK to debug the python code running in my C#
application.

If I host IronPython 1.1 in a C# application, I can set the
IronPython.Hosting.EngineOptions.ClrDebuggingEnabled flag to true as in the
example below.  This allows me to step through the python code in test.py in
Visual Studio.  Is there something similar to the ClrDebuggingEnabled in
IronPython 2.0?  Thanks.

Josh

Program.cs:

using System;
using System.Collections.Generic;
using System.Text;
using IronPython;
using IronPython.Hosting;

namespace TestDebugEmbeddedIronPyton
{
    class Program
    {
        static void Main(string[] args)
        {
            EngineOptions eo = new EngineOptions();
            eo.ClrDebuggingEnabled = true;
            PythonEngine pe = new PythonEngine(eo);
            pe.ExecuteFile(@"C:\test.py");
        }
    }
}

test.py:

import System
import System.Diagnostics
print "Test 1"
System.Diagnostics.Debugger.Break()
print "Test 2"

-- 
Rejoice always. Pray without ceasing. In all circumstances give thanks, for
this is the will of God for you in Christ Jesus. -- 1 Thes. 5:16-18 NAB
--
I am the living bread that came down from heaven; whoever eats this bread
will live forever; and the bread that I will give is my flesh for the life
of the world. -- John 6:51 NAB
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20080721/600691f1/attachment.html>


More information about the Ironpython-users mailing list