[Ironpython-users] IronPython running WDB client

Daniel Fernandez fernandez_dan2 at hotmail.com
Sun May 24 17:17:54 CEST 2015

Hi All,
It looks like one is always returned for f_lineno. Here is the output for a simple example output IronPython vs CPython. I used -X:FullFrames for ipy.exe.
IronPython 2.7.5 ( on .NET 4.0.30319.0 (32-bit)
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> def fun():
...     a = 2
...     b = 3
...     c = 4
...     print(sys._getframe().f_lineno)
>>> fun()
Python 2.7.9 (default, Dec 10 2014, 12:24:55) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> def fun():
...     a = 2
...     b = 3
...     c = 4
...     print(sys._getframe().f_lineno)
>>> fun()
I also created a script with the same simple code and ran the script instead of creating the function in the interactive console and it had the same result as above. 

From: kerray.cz at gmail.com
Date: Fri, 22 May 2015 11:37:07 +0200
To: m.schaber at codesys.com; ironpython-users at python.org
Subject: Re: [Ironpython-users] IronPython running WDB client

Hi Markus,thanks for the tip, but I already do run it with -X:FullFrames :/
On Thu, May 21, 2015 at 3:33 PM, Markus Schaber <m.schaber at codesys.com> wrote:

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
When the IronPython compiler parses your main module, sys.settrace() was not called yet, so the code generated there will work the optimized way.
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. 
Best regards

Markus Schaber

a trademark of 3S-Smart Software Solutions GmbH

Inspiring Automation Solutions

3S-Smart Software Solutions GmbH

Dipl.-Inf. Markus Schaber | Product Development Core Technology 

Memminger Str. 151 | 87439 Kempten | Germany 

Tel. +49-831-54031-979 | Fax +49-831-54031-50 

E-Mail: m.schaber at codesys.com
 | Web: codesys.com
 | CODESYS store: store.codesys.com

CODESYS forum: forum.codesys.com

Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner
 | Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received

this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure

or distribution of the material in this e-mail is strictly forbidden.

Von: Ironpython-users [mailto:ironpython-users-bounces+m.schaber=codesys.com at python.org]
Im Auftrag von Kerray

Gesendet: Donnerstag, 21. Mai 2015 14:04

An: ironpython-users at python.org

Betreff: [Ironpython-users] IronPython running WDB client



https://github.com/Kozea/wdb 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 :)


Recently I've been able to run the client part of it in IronPython 2.7.6a0 with minor modifications (https://github.com/kerray/wdb/commit/72019a080df8252c663e8e630d4fd104976ceff8).
 The server part runs in CPython and for my purposes, this doesn't matter as far as the code I'm debugging is IronPython.


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.


I've been asking and posting logs in WDB 
https://github.com/Kozea/wdb/issues/51/ however it seems to be more of a IronPython matter.


So please, any ideas? For example, does IronPython have the correct info in frame.f_lineno?


Thanks for anything



Jaromír "Kerray" Matýšek





Ironpython-users mailing list
Ironpython-users at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20150524/f2b027ad/attachment.html>

More information about the Ironpython-users mailing list