[IronPython] Question about Visual Studio & Iron Python Tools and Debugging

Dino Viehland dinov at microsoft.com
Wed Sep 1 18:28:55 CEST 2010

The scripts need to be started in debug mode and be stored in files
somewhere on disk (so Visual Studio can load the source code).  To enable
debug mode you can set the DebugMode property on the ScriptRuntimeSetup

So this ends up looking like:

var setup = Python.CreateRuntimeSetup();
setup.DebugMode = true;
var runtime = new ScriptRuntime(setup);

Alternately can also pass in "Debug" = true to the IDictionary<string, object> when
creating a Python engine:

var dict = new Dictionary<string, object>();
dict["Debug"] = true;

When you attach all of the Python code should be debuggable.

> -----Original Message-----
> From: users-bounces at lists.ironpython.com [mailto:users-
> bounces at lists.ironpython.com] On Behalf Of Marty Nelson
> Sent: Wednesday, September 01, 2010 8:42 AM
> To: Discussion of IronPython
> Subject: [IronPython] Question about Visual Studio & Iron Python Tools and
> Debugging
> How does debugging work when attaching to a process with IPy Tools in
> Visual Studio?
> Can I attach to an .NET application that has extension points that go
> into ScriptEngine and "debug" the Python scripts?
> =======
> Notice: This e-mail message, together with any attachments, contains
> information of Symyx Technologies, Inc. or any of its affiliates or
> subsidiaries that may be confidential, proprietary, copyrighted,
> privileged and/or protected work product, and is meant solely for
> the intended recipient. If you are not the intended recipient, and
> have received this message in error, please contact the sender
> immediately, permanently delete the original and any copies of this
> email and any attachments thereto.
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

More information about the Ironpython-users mailing list