[IronPython] Iron Python debuggin using PythonEngine

Michael Stephens falcon at uwyo.edu
Tue Jun 3 07:01:13 CEST 2008


Hello all, This is my first post so bear with me!

My company is using iron python as an embedded scripting engine and we are
loving every piece of it.  I just downloaded IronPython Studio and am
working on making our scripts available to the studio for editing so we can
get intellisense.  As a side project I wanted to see if I could get Iron
Python to work with break points. In python studio I "ran without debugging"
this piece of code.  It forced me to connect to vs2008 and allowed me to
find my program.py file and debug it.

hello = "Hello VSX!!!"
import System
import System.Diagnostics
print hello
System.Diagnostics.Debugger.Launch()
System.Diagnostics.Debugger.Break()
print hello

The problem lies when i execute this file from the PythonEngine.  The code
below is in c# and when executed prompts me to attach to C# program.cs not
program.py .
            PythonEngine eng = new PythonEngine();
            eng.CreateModule();
            eng.Import("System");
            eng.Import("System.Diagnostics");
            eng.ExecuteFile(@"IronPython
Studio\ConsoleApplication3\ConsoleApplication3\Program.py");

Does anyone have any ideas on how to get this to work.  I really love the
idea of hosting ironpython in our application but we could definitely use
the ability to get breakpoints.



-- 
Michael Stephens

Electrical Engineering Graduate Student
University of Wyoming
falcon at uwyo.edu or 89iroc at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20080602/b99edfe0/attachment.html>


More information about the Ironpython-users mailing list