[Ironpython-users] Options for debugger for DLR languages on Mono

Doug Blank doug.blank at gmail.com
Sat Sep 24 03:37:52 CEST 2011


Thanks all for all the great pointers!

Looks like we'll probably start with Python and the standard debugger,
but work towards a generic Microsoft.Scripting.Debugging solution.
That sounds like a big project that many people would be interested
in.

-Doug

On Thu, Sep 22, 2011 at 12:00 PM, Dino Viehland <dinov at microsoft.com> wrote:
> Yep, not only is most of the code in C# and Python the debugger its self doesn't actually depend on Visual Studio.
>
> If you look at the PythonProcess class it's the stand alone debugger.  This exposed to VS by wrapping it in the AD7Engine* classes.  But presumably it can be exposed to any other debugger API.  PythonProcess generally works by having some APIs you can call on to get/set (get threads, eval an expression, set breakpoints, etc...) info and then it has some events when things happen (breakpoints hit, thread created, stepping done, etc...).
>
> That only gets you Python debugging though and general DLR debugging is implemented using the .NET debugger which is part of Visual Studio, not PTVS.
>
> Microsoft.Scripting.Debugging would work under Mono (it's just an AST re-writer which enables sys.settrace style debugger) but someone still needs to write the actual debugger part.
>
> -----Original Message-----
> From: ironpython-users-bounces+dinov=microsoft.com at python.org [mailto:ironpython-users-bounces+dinov=microsoft.com at python.org] On Behalf Of Steve Dower
> Sent: Thursday, September 22, 2011 3:27 AM
> To: Dave Wald
> Cc: ironpython-users at python.org
> Subject: Re: [Ironpython-users] Options for debugger for DLR languages on Mono
>
> Dino will know better than I do, but most if not all the C++ code in PTVS is for debugging, but only for attaching to running CPython processes. Otherwise, the debugger is largely based around a 'settrace' script and a C# debug engine communicating through sockets
> - nothing to do with the DLR.
>
> The DLR debugger is still in there though, but I have no idea how easy it is to separate the two. You may want to look at the old IronPython Tools (https://github.com/IronLanguages/main/tree/master/Tools/IronStudio),
> since they won't have any of the CPython support, though there are bugs that were fixed in PTVS since IPyTools were last updated.
>
> On Wed, Sep 21, 2011 at 13:30, Dave Wald <davew252 at tx.rr.com> wrote:
>> Doug,
>> First off, congrats on the Calico project. Seriously cool. I wish I
>> was one of your students just starting out.
>> These kids today... jeez.
>> Anyway, if I was gonna tackle that project, first thing I would do is
>> download the source code for PyTools for Visual Studio (it does
>> CLR/DLR and
>> CPython)
>> http://pytools.codeplex.com/SourceControl/list/changesets
>> and study it til I puked.
>> Secondly, I would do the same with MonoDevelop, and do the old
>> compare-and-contrast drill.
>> Write myself a white-paper, as it were. Profusely annotated and
>> Visio-diagrammed unto death.
>> And then outline what I could re-use as is and where I needed to do
>> major surgery.
>> (Or get the students to do it... ;-)   ) PyTools is written in C#
>> mostly, looks like, with a sprinkling of C++/unsafe native code, but
>> not in the debuggers. They look like straight cs.
>> I have no idea what MonoDevelop looks like under the hood.
>> But between the two, I would expect to be able to get a pretty good
>> idea what could  be done without re-inventing the world.
>>
>> That's my two cents...
>>
>> Best,
>> Dave
>>
>> On 9/19/2011 8:09 AM, Doug Blank wrote:
>>>
>>> IronPython users,
>>>
>>> We have a fairly robust editor/shell written in IronPython, using
>>> Gtk#, running under cross-platform Mono with abilities to switch
>>> between many languages (including Python, Ruby, Scheme, Lua, FSharp,
>>> CSharp, Boo, and a new visual Scratch-based language called Jigsaw.
>>> Although not all are DLR-based.) [1].
>>>
>>> What would be the best option for creating an interactive debugger
>>> for the DLR languages on Mono? We would want to be able to set
>>> break-points, single step, and inspect local variables. Ideally, this
>>> would be a generic, language-neutral API, but if we have to do one
>>> for each language, that might work too. Things we've looked at:
>>>
>>> a) Seo's FePy Mono Profiler, but that seems too low-level, and
>>> requires C code for each platform.
>>>
>>> b) Microsoft.Scripting.Debugging [3], but will that work under Mono?
>>>
>>> c) sys.settrace(), but that would be Python-specific, and can't
>>> single-step (?)
>>>
>>> Are there other issues/options to consider? Please feel free to point
>>> me towards useful resources.
>>>
>>> Thanks!
>>>
>>> -Doug
>>>
>>> [1] - http://calicoproject.org/
>>> [2] - http://fepy.blogspot.com/2007/06/pyprof-progresses.html
>>> [3] - http://devhawk.net/2009/07/08/microsoft-scripting-debugging/
>>> _______________________________________________
>>> Ironpython-users mailing list
>>> Ironpython-users at python.org
>>> http://mail.python.org/mailman/listinfo/ironpython-users
>>>
>>
>> _______________________________________________
>> Ironpython-users mailing list
>> Ironpython-users at python.org
>> http://mail.python.org/mailman/listinfo/ironpython-users
>>
> _______________________________________________
> Ironpython-users mailing list
> Ironpython-users at python.org
> http://mail.python.org/mailman/listinfo/ironpython-users
> _______________________________________________
> Ironpython-users mailing list
> Ironpython-users at python.org
> http://mail.python.org/mailman/listinfo/ironpython-users
>


More information about the Ironpython-users mailing list