Python – breakpoints in hosted IronPython scripts

ironpython

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 Debugging IronPython scripts in hosted (embedded) environment. Wasn't able to find this one before posting my question. Go ahead and close this one.

Best Answer

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

Microsoft.Scripting.Debugging