[IronPython] Question about Visual Studio & Iron Python Toolsand Debugging

Marty Nelson Marty.Nelson at symyx.com
Wed Sep 1 18:44:17 CEST 2010


Setting DebugMode seems easy enough.

The script code is loaded from an in-memory string.  Would we need to
write it out to temp file first for debug case?  How does debugger
"know" what source is?

Thx

-----Original Message-----
From: users-bounces at lists.ironpython.com
[mailto:users-bounces at lists.ironpython.com] On Behalf Of Dino Viehland
Sent: Wednesday, September 01, 2010 9:29 AM
To: Discussion of IronPython
Subject: Re: [IronPython] Question about Visual Studio & Iron Python
Toolsand Debugging

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
object.

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;
Python.CreateEngine(dict);

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
_______________________________________________
Users mailing list
Users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

=======
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.



More information about the Ironpython-users mailing list