tags:

views:

149

answers:

1

I know I can set breakpoints and debug stand-alone IronPython scripts in VisualStudio. However, I have an application which hosts the IronPython engine. If I want to debug a script running in the hosted engine, is there a way to set breakpoints and step through the script? Should I be methods other than ExecuteFile to accomplish this? Basically I would like to attach the debugger to the process, break at ExecuteFile, and then step through the IronPython code.

// engine is the hosted IronPython engine and script is the .py file to execute
engine.ExecuteFile(script);

EDIT: I believe this is a dupe of http://stackoverflow.com/questions/676188/debugging-ironpython-scripts-in-hosted-embedded-environment. Wasn't able to find this one before posting my question. Go ahead and close this one.

A: 

Harry Pierson (DevHawk) has a good blog post to get you started with DLR debugging.

Microsoft.Scripting.Debugging

W. Kevin Hazzard