<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.E-MailFormatvorlage17
        {mso-style-type:personal-reply;
        font-family:"Arial","sans-serif";
        color:windowtext;
        font-weight:normal;
        font-style:normal;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif"">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif"">As far as I know, the IronPython dynamic code generation does not generate Python frames by default, for optimization purposes (to leverage the .NET Just in Time
 compiler).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif"">When the IronPython compiler parses your main module, sys.settrace() was not called yet, so the code generated there will work the optimized way.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif"">IronPython has the options -X:Frames and -X:FullFrames which you can set either on the command line, or (in hosted environments) when you create the executor instance,
 then sys.settrace() should work for the top level frame, too. <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">Best regards<br>
<br>
Markus Schaber</span><span lang="EN-US"><br>
<br>
</span><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363">CODESYS<sup>®</sup></span></b><span lang="EN-US">
</span><span lang="EN-US" style="font-size:8.0pt;font-family:"Arial","sans-serif";color:#B1B2B3">a trademark of 3S-Smart Software Solutions GmbH</span><span lang="EN-US">
<br>
</span><b><span lang="EN-US" style="font-size:2.0pt;font-family:"Arial","sans-serif";color:#636363"><br>
</span></b><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363">Inspiring Automation Solutions
</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363"><o:p></o:p></span></p>
<div class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363">
<hr size="1" width="643" style="width:482.25pt" noshade="" style="color:#636363" align="left">
</span></div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363">3S-Smart Software Solutions GmbH
<br>
Dipl.-Inf. Markus Schaber | Product Development Core Technology <br>
Memminger Str. 151 | 87439 Kempten | Germany <br>
Tel. +49-831-54031-979 | Fax +49-831-54031-50 <br>
<br>
E-Mail: </span><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363"><a href="mailto:m.schaber@codesys.com"><span lang="EN-US" style="color:#E3000F;text-decoration:none">m.schaber@codesys.com</span></a></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363">
 | Web: </span><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363"><a href="http://www.codesys.com"><span lang="EN-US" style="color:#E3000F;text-decoration:none">codesys.com</span></a></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363">
 | CODESYS store: </span><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363"><a href="http://store.codesys.com"><span lang="EN-US" style="color:#E3000F;text-decoration:none">store.codesys.com</span></a></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363">
<br>
CODESYS forum: </span><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363"><a href="http://forum.codesys.com"><span lang="EN-US" style="color:#E3000F;text-decoration:none">forum.codesys.com</span></a></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363">
<br>
<br>
</span><i><span lang="EN-US" style="font-size:8.0pt;font-family:"Arial","sans-serif";color:#636363">Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner</span></i><span lang="EN-US" style="font-size:8.0pt;font-family:"Arial","sans-serif";color:#636363">
 | <i>Trade register: Kempten HRB 6186</i> | <i>Tax ID No.: DE 167014915</i></span><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363">
<o:p></o:p></span></b></p>
<div class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363">
<hr size="1" width="643" style="width:482.25pt" noshade="" style="color:#636363" align="left">
</span></b></div>
<p class="MsoNormal"><i><span lang="EN-US" style="font-size:8.0pt;font-family:"Arial","sans-serif";color:#636363">This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received
<br>
this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure
<br>
or distribution of the material in this e-mail is strictly forbidden.</span></i><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363">
</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif""><o:p></o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Von:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Ironpython-users [mailto:ironpython-users-bounces+m.schaber=codesys.com@python.org]
<b>Im Auftrag von </b>Kerray<br>
<b>Gesendet:</b> Donnerstag, 21. Mai 2015 14:04<br>
<b>An:</b> ironpython-users@python.org<br>
<b>Betreff:</b> [Ironpython-users] IronPython running WDB client<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hi,<o:p></o:p></p>
<div>
<p class="MsoNormal"><a href="https://github.com/Kozea/wdb">https://github.com/Kozea/wdb</a> is a slick remote debugger with web interface which I've been eyeing for quite some time, and I think I'm not the only one to whom this would be useful :)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Recently I've been able to run the client part of it in IronPython 2.7.6a0 with minor modifications (<a href="https://github.com/kerray/wdb/commit/72019a080df8252c663e8e630d4fd104976ceff8">https://github.com/kerray/wdb/commit/72019a080df8252c663e8e630d4fd104976ceff8</a>).
 The server part runs in CPython and for my purposes, this doesn't matter as far as the code I'm debugging is IronPython.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">There's a problem however that while I can now walk through IronPython source in a browser window, WDB ignores the code in baseline module, and only steps into the code when the module is executing a function. It steps through the function,
 I can inspect variables etc, but when that function ends, it doesn't step back into the module.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I've been asking and posting logs in WDB <a href="https://github.com/Kozea/wdb/issues/51/">
https://github.com/Kozea/wdb/issues/51/</a> however it seems to be more of a IronPython matter.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">So please, any ideas? For example, does IronPython have the correct info in <span style="font-size:9.0pt;font-family:Consolas;color:#333333">frame.f_lineno?</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks for anything<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Jaromír "Kerray" Matýšek<o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>