Hi All,
 
I was mistaken I needed to add -X:Tracing which enable the correct f_lineno
 
Danny
 
From: fernandez_d...@hotmail.com
To: kerray...@gmail.com; m.scha...@codesys.com; ironpython-users@python.org
Date: Sun, 24 May 2015 09:17:54 -0600
Subject: Re: [Ironpython-users] IronPython running WDB client




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 (2.7.5.0) 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()
1
 
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()
5
 
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. 
 
Danny
 
 

 
From: kerray...@gmail.com
Date: Fri, 22 May 2015 11:37:07 +0200
To: m.scha...@codesys.com; ironpython-users@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 :/
J
On Thu, May 21, 2015 at 3:33 PM, Markus Schaber <m.scha...@codesys.com> wrote:








Hi,
 
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).
 
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



CODESYS®
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.scha...@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....@python.org]
Im Auftrag von Kerray

Gesendet: Donnerstag, 21. Mai 2015 14:04

An: ironpython-users@python.org

Betreff: [Ironpython-users] IronPython running WDB client


 

Hi,

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@python.org
https://mail.python.org/mailman/listinfo/ironpython-users                       
                  

_______________________________________________
Ironpython-users mailing list
Ironpython-users@python.org
https://mail.python.org/mailman/listinfo/ironpython-users                       
                  
_______________________________________________
Ironpython-users mailing list
Ironpython-users@python.org
https://mail.python.org/mailman/listinfo/ironpython-users

Reply via email to