<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2769" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=322540715-04112005><FONT face=Verdana
color=#800000 size=2>Because it it generated as a code snippet into the snippet
assembly which doesn't have association with the source file and therefore the
debugger cannot make the connection between the code and the source
file.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=322540715-04112005><FONT face=Verdana
color=#800000 size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=322540715-04112005><FONT face=Verdana
color=#800000 size=2>I'm going to look into whether this could get
changed/fixed.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=322540715-04112005><FONT face=Verdana
color=#800000 size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=322540715-04112005><FONT face=Verdana
color=#800000 size=2>Martin</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> users-bounces@lists.ironpython.com
[mailto:users-bounces@lists.ironpython.com] <B>On Behalf Of </B>Angelo
Xu<BR><B>Sent:</B> Friday, November 04, 2005 3:18 AM<BR><B>To:</B> Discussion of
IronPython<BR><B>Subject:</B> Re: [IronPython] How to do debugging for embedded
usage<BR></FONT><BR></DIV>
<DIV></DIV>why engine.ExecuteFile(fileName) can't be debuged<BR><BR>
<DIV><SPAN class=gmail_quote>2005/11/2, Martin Maly <<A
href="mailto:Martin.Maly@microsoft.com">Martin.Maly@microsoft.com</A>>:</SPAN>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV dir=ltr align=left><SPAN><FONT face=Verdana color=#800000 size=2>It
largely depends on how your Python scripts are written. If you use following
format:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Verdana color=#800000
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Verdana color=#800000
size=2>engine.Execute("print "Hello")</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Verdana color=#800000
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Verdana color=#800000
size=2>debugging is hard because <SPAN class=st0 id=st
name="st">IronPython</SPAN> has no source code to map debugging info
to.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Verdana color=#800000 size=2>On the
other hand, if you have your scripts stored in the files and execute them
via:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Verdana color=#800000
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Verdana color=#800000
size=2>engine.RunFile(fileName);</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Verdana color=#800000
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Verdana color=#800000 size=2>then
<SPAN class=st0 id=st name="st">IronPython</SPAN> generates <SPAN class=st0
id=st name="st">debug</SPAN> info and debugging is straightforward - attach
debugger to your app and place breakpoint into the Python source file and
things mostly work as you'd expect. There are some rough edges to be polished,
but debugging this way is quite good already.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Verdana color=#800000
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Verdana color=#800000 size=2>Hope
this helps</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Verdana color=#800000
size=2>Martin</FONT></SPAN></DIV><BR>
<DIV lang=en-us dir=ltr align=left>
<HR>
<FONT face=Tahoma size=2><B>From:</B> <A
onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:users-bounces@lists.ironpython.com"
target=_blank>users-bounces@lists.<SPAN class=st0 id=st name="st">
ironpython</SPAN>.com</A> [mailto:<A
onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:users-bounces@lists.ironpython.com"
target=_blank>users-bounces@lists.<SPAN class=st0 id=st
name="st">ironpython</SPAN>.com</A>] <B>On Behalf Of </B>Michael
Latta<BR><B>Sent:</B> Tuesday, November 01, 2005 8:59 PM<BR><B>To:</B>
'Discussion of <SPAN class=st0 id=st
name="st">IronPython</SPAN>'<BR><B>Subject:</B> [<SPAN class=st0 id=st
name="st">IronPython</SPAN>] How to do debugging for embedded
usage<BR></FONT><BR></DIV>
<DIV><SPAN class=e id=q_107517cb44ea8e8d_1>
<DIV></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN>When I am using IronPython
within my application (for scripting/extension) how do I support
debugging? Is there an event in the engine when a break point is
hit? How do I specify to the engine that there is a break point? I
presume I need to provide an editor and such myself, as well as a UI for
examining the run-time state? I presume I can use the stack walker for
examining the stack?</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN>Michael</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff
size=2><SPAN></SPAN></FONT> </DIV></SPAN></DIV><BR>_______________________________________________<BR>users
mailing list<BR><A onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:users@lists.ironpython.com">users@lists.<SPAN class=st0 id=st
name="st"> ironpython</SPAN>.com</A><BR><A
onclick="return top.js.OpenExtLink(window,event,this)"
href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com"
target=_blank>http://lists.<SPAN class=st0 id=st name="st">
ironpython</SPAN>.com/listinfo.cgi/users-<SPAN class=st0 id=st
name="st">ironpython</SPAN>.com</A><BR><BR><BR></BLOCKQUOTE></DIV><BR><BR
clear=all><BR>-- <BR>The shift of focus (to patterns) will <BR>have a profound
and enduring effect <BR>on the way we write
programs.<BR> --Ward Cunningham
and Ralph Johnson </BODY></HTML>