[IronPython] Debugging support PythonEngine
kristof.wagemans at gmail.com
Thu Jul 27 15:14:46 CEST 2006
I have been experimenting with the debugging support for the PythonEngine.
When I use the following code I have several problems.
EngineOptions options = new EngineOptions();
options.ClrDebuggingEnabled = true;
_pe = new PythonEngine(options);
_pe.ExecuteFile(@" <script> ");
x = 1
y = 2
def Add(a, b):
return a + b
z = Add(x, y)
I opened the script file in Visual Studio and placed a breakpoint at the
beginning of the file. The application runs and breaks at the correct
location. Stepping through the lines works, but I cannot see any values of
When I try to step into the function I get a notification that there is no
source code available and I must show the disassembly. After I step several
times through the assembly I can return to the source code.
I have looked at debugging ipy.exe and there I can see the variables, but I
still have the problem with stepping into a function. In ipy.exe the script
file is executed in a different way. Using the same method I can also see
the variables. I apparently don't need to set ClrDebuggingEnabled.
_pe = new PythonEngine();
OptimizedEngineModule engineModule = _pe.CreateOptimizedModule(@" <script>
", "__main__", true);
Are you required to use an OptimizedEngineModule to be able to debug? Am I
forgetting some settings for debugging? Can I step directly into a function
without getting into the assembly?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ironpython-users