Re: [E-devel] Debugging edc at runtime is possible?

2016-09-23 Thread The Rasterman
On Wed, 21 Sep 2016 01:19:06 +0900 Jiwon Kim  said:

> Hi all.
> 
> I wonder about debugging edc script. (or maybe it's just idea :) )
> Is it possible to debug at running time of application?
> Likes gdb (or with gdb), attach to app,
>  and set break point to 'program' syntex (edc's program blocks).

hmm no as embryo is interpreted by the embryo vm... it's bytecode loaded at
runtime - i t has no idea of its original src. :) you could emit a signal and
use edje debugging to watch these signals like

emit("EDJEDEBUG", "something");

in your embryo script and have your code listen to "EDJEDEBUG" "*" messages and
print them out... 

> If we can check edc's (when/which) program running and signaling,
> I think it's very convenient.
> 
> If it is impossible, how about log function for edc? (only for debug)
> 
> Does anyone has know-how regarding this?
> Or, has anyone ever tried to similar attempt?

there isnt any such log/echo/printf function in edje atm. it'd be easy to maybe
add a DBG macro to edje_programs.c ... when a signal is emitted and use the
above emit as a debug...

then do:

export EINA_LOG_LEVELS=edje:4

and edje will give you debug log levels...

DBG<15145>:edje lib/edje/edje_program.c:1285 _edje_emit_handle() EDJE EMIT:
(0x5 5604e48afb0) signal: "elm,action,hide,vbar" source: "elm"

like that... any emits. so grep/filter for your emit log... :) i'll enable the
DBG in git now.. but his needs a new efl release. commit is here:

https://git.enlightenment.org/core/efl.git/commit/?id=8257c95f39eb2ba942f0f4821d19d5493749d34b

> Regards.
> Jiwon Kim.
> --
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 


-- 
- Codito, ergo sum - "I code, therefore I am" --
The Rasterman (Carsten Haitzler)ras...@rasterman.com


--
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Debugging edc at runtime is possible?

2016-09-22 Thread Hermet Park
U can use printf() in the program script for debugging.

ie)

programs {
   ..
   script {
printf("call %d\n", xxx);
   }
}

the printf logs will be printed ony when app launched with EINA_LOG_LEVEL=3 or 
more.
--
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Debugging edc at runtime is possible?

2016-09-20 Thread Michael Blumenkrantz
On Tue, 20 Sep 2016 09:52:53 -0700
Cedric BAIL  wrote:

> Hello,
> 
> On Tue, Sep 20, 2016 at 9:19 AM, Jiwon Kim  wrote:
> > I wonder about debugging edc script. (or maybe it's just idea :) )
> > Is it possible to debug at running time of application?
> > Likes gdb (or with gdb), attach to app,
> >  and set break point to 'program' syntex (edc's program blocks).  
> 
> This is an interesting idea. I don't know if it could be doable
> actually as program are run related to time. Any debugging would
> likely affect that.

it's possible to do this by breaking conditionally on the _edje_program_run 
function based on a program's attributes

> 
> > If we can check edc's (when/which) program running and signaling,
> > I think it's very convenient.  
> 
> Agreed, I don't see a way to do step by step debugging of an edc. Will
> have to think about it.

this is also possible by breaking on edje/embryo/edje_embryo functions and 
stepping through them

> 
> > If it is impossible, how about log function for edc? (only for debug)  
> 
> Once upon a time, there was a lot of log generated in the form of edje
> signal. They were removed as they impacted speed to much. Today, we
> have evlog, it may be worse experimenting with it and see if we can
> log events with it somehow. Alternative possibility would be to add an
> eo event on edje object for debug. Once someone register for that
> event, we would trigger that event for every state we want to debug.
> Between evlog and eo event tracing, I don't know which one could work
> best. You would have to experiment !
> 
> Have fun !

--
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Debugging edc at runtime is possible?

2016-09-20 Thread Cedric BAIL
Hello,

On Tue, Sep 20, 2016 at 9:19 AM, Jiwon Kim  wrote:
> I wonder about debugging edc script. (or maybe it's just idea :) )
> Is it possible to debug at running time of application?
> Likes gdb (or with gdb), attach to app,
>  and set break point to 'program' syntex (edc's program blocks).

This is an interesting idea. I don't know if it could be doable
actually as program are run related to time. Any debugging would
likely affect that.

> If we can check edc's (when/which) program running and signaling,
> I think it's very convenient.

Agreed, I don't see a way to do step by step debugging of an edc. Will
have to think about it.

> If it is impossible, how about log function for edc? (only for debug)

Once upon a time, there was a lot of log generated in the form of edje
signal. They were removed as they impacted speed to much. Today, we
have evlog, it may be worse experimenting with it and see if we can
log events with it somehow. Alternative possibility would be to add an
eo event on edje object for debug. Once someone register for that
event, we would trigger that event for every state we want to debug.
Between evlog and eo event tracing, I don't know which one could work
best. You would have to experiment !

Have fun !
-- 
Cedric BAIL

--
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel