Re: [E-devel] E SVN: acidx trunk/PROTO/elev8/src/bin

2012-08-15 Thread Daniel Willmann
Hello,

On 08/14/2012 08:04 PM, Enlightenment SVN wrote:
 Log:
 elev8: Flush stdout when printing debug message
 
 Author:   acidx

 Modified: trunk/PROTO/elev8/src/bin/main.cc
 ===
 --- trunk/PROTO/elev8/src/bin/main.cc 2012-08-14 19:04:50 UTC (rev 75265)
 +++ trunk/PROTO/elev8/src/bin/main.cc 2012-08-14 19:04:52 UTC (rev 75266)
 @@ -337,6 +337,7 @@
 else if (argc = 3  !strcmp(argv[1], --debug))
   {
  printf(Awaiting connection from debugger on port 5858.);
 +fflush(stdout);

I stumbled upon this yesterday as well, but wouldn't it be better to add
a newline at the end of the printf instead?

Regards,
Daniel

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] E SVN: acidx trunk/PROTO/elev8/src/bin

2012-06-29 Thread Gustavo Sverzut Barbieri
Ecore_Getopt?

On Friday, June 29, 2012, Enlightenment SVN wrote:

 Log:
 elev8: Add JavaScript debugger support

  To use the v8 debugger (d8), simply run elev8 with the --debug
 parameter,
  then the script name.  On another terminal, run ``d8 --remote_debugger''
 --
  when connected, breakpoints can be set, etc.  Type ``help'' on d8 command
  line for available commands.  To resume execution, use ``continue''.

 Author:   acidx
 Date: 2012-06-29 10:03:05 -0700 (Fri, 29 Jun 2012)
 New Revision: 73048
 Trac: http://trac.enlightenment.org/e/changeset/73048

 Modified:
  trunk/PROTO/elev8/src/bin/main.cc

 Modified: trunk/PROTO/elev8/src/bin/main.cc
 ===
 --- trunk/PROTO/elev8/src/bin/main.cc   2012-06-29 17:03:02 UTC (rev 73047)
 +++ trunk/PROTO/elev8/src/bin/main.cc   2012-06-29 17:03:05 UTC (rev 73048)
 @@ -5,11 +5,12 @@
  * then exit
  */

 -#include unistd.h
  #include dlfcn.h
  #include Ecore.h
  #include elev8_common.h
  #include elev8_utils.h
 +#include unistd.h
 +#include v8-debug.h
  #include storage.h
  #include timer.h

 @@ -283,9 +284,25 @@
boom(message, *String::Utf8Value(message-Get()));
  }

 +static Eina_Bool
 +debug_message_handler_idler_cb(void *)
 +{
 +   DBG(Processing debug messages);
 +   Debug::ProcessDebugMessages();
 +   return ECORE_CALLBACK_CANCEL;
 +}
 +
 +static void
 +debug_message_handler()
 +{
 +   ecore_idler_add(debug_message_handler_idler_cb, NULL);
 +}
 +
  int
 -main(int argc, char **argv)
 +main(int argc, char *argv[])
  {
 +   int script_arg = 1;
 +
eina_init();
elev8_log_domain = eina_log_domain_register(elev8, EINA_COLOR_ORANGE);
if (!elev8_log_domain)
 @@ -296,6 +313,10 @@
  }
INF(elev8 Logging initialized. %d, elev8_log_domain);

 +   V8::SetFlagsFromCommandLine(argc, argv, true);
 +   V8::AddMessageListener(message, Undefined());
 +   V8::SetCaptureStackTraceForUncaughtExceptions(true, 10,
 StackTrace::kDetailed);
 +
if (argc  2)
  {
 ERR(%s: Error: no input file specified., argv[0]);
 @@ -305,11 +326,14 @@
  argv[0], argv[0]);
 exit(-1);
  }
 +   else if (argc = 3  !strcmp(argv[1], --debug))
 + {
 +printf(Awaiting connection from debugger on port 5858.);
 +Debug::EnableAgent(elev8, 5858, true);
 +Debug::SetDebugMessageDispatchHandler(debug_message_handler);
 +script_arg = 2;
 + }

 -   V8::SetFlagsFromCommandLine(argc, argv, true);
 -   V8::AddMessageListener(message, Undefined());
 -   V8::SetCaptureStackTraceForUncaughtExceptions(true, 10,
 StackTrace::kDetailed);
 -
HandleScope handle_scope;
global = PersistentObjectTemplate::New(ObjectTemplate::New());

 @@ -327,7 +351,7 @@

if (!run_script(PACKAGE_LIB_DIR /../init.js))
  goto end;
 -   if (!run_script(argv[1]))
 +   if (!run_script(argv[script_arg]))
  goto end;

ecore_main_loop_begin();



 --
 Live Security Virtual Conference
 Exclusive live event will cover all the ways today's security and
 threat landscape has changed and how IT managers can respond. Discussions
 will include endpoint security, mobile security and the latest in malware
 threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
 ___
 enlightenment-svn mailing list
 enlightenment-...@lists.sourceforge.net javascript:;
 https://lists.sourceforge.net/lists/listinfo/enlightenment-svn



-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--
MSN: barbi...@gmail.com
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] E SVN: acidx trunk/PROTO/elev8/src/bin

2012-03-06 Thread Leandro Pereira
On Mon, Mar 5, 2012 at 9:36 PM, Gustavo Sverzut Barbieri
barbi...@profusion.mobi wrote:
 As you can see, you should NOT use the eina_log.h MACRO, use the
 function instead and provide more meaningful file/line instead of
 always doing elev8_utils.cc:60 :-)

Wouldn't make any difference here: Eina_Log wouldn't know about the
JavaScript file name :)

-- 
  Leandro

--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] E SVN: acidx trunk/PROTO/elev8/src/bin

2012-03-06 Thread Gustavo Sverzut Barbieri
On Tue, Mar 6, 2012 at 7:35 AM, Leandro Pereira lean...@profusion.mobi wrote:
 On Mon, Mar 5, 2012 at 9:36 PM, Gustavo Sverzut Barbieri
 barbi...@profusion.mobi wrote:
 As you can see, you should NOT use the eina_log.h MACRO, use the
 function instead and provide more meaningful file/line instead of
 always doing elev8_utils.cc:60 :-)

 Wouldn't make any difference here: Eina_Log wouldn't know about the
 JavaScript file name :)

Can't you change it so it does know? and use
http://docs.enlightenment.org/auto/eina/group__Eina__Log__Group.html#ga2ad47c77225cbcf8d35840547b5bbbe4


-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--
MSN: barbi...@gmail.com
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202

--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] E SVN: acidx trunk/PROTO/elev8/src/bin

2012-03-06 Thread Leandro Pereira
On 03/06/2012 07:48 AM, Gustavo Sverzut Barbieri wrote:
 Can't you change it so it does know? and use
 http://docs.enlightenment.org/auto/eina/group__Eina__Log__Group.html#ga2ad47c77225cbcf8d35840547b5bbbe4

It is already working. What wasn't working were that imported JavaScript 
modules didn't set their file names, so that error messages were printed 
as happening on file undefined.

 Leandro

--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] E SVN: acidx trunk/PROTO/elev8/src/bin

2012-03-06 Thread Gustavo Sverzut Barbieri
On Tue, Mar 6, 2012 at 11:59 AM, Leandro Pereira lean...@profusion.mobi wrote:

 On 03/06/2012 07:48 AM, Gustavo Sverzut Barbieri wrote:
  Can't you change it so it does know? and use
 
  http://docs.enlightenment.org/auto/eina/group__Eina__Log__Group.html#ga2ad47c77225cbcf8d35840547b5bbbe4

 It is already working. What wasn't working were that imported JavaScript
 modules didn't set their file names, so that error messages were printed
 as happening on file undefined.

From your example:

ERR11319:elev8 elev8_utils.cc:60 boom() ./app.js:12 TypeError:
Object [object Object] has no method 'derp'

In my opinion it should be:

ERR11319:elev8 ./app.js:12 jsfunc() TypeError: Object [object
Object] has no method 'derp'


did you understand what I mean? you provide JS values for file,
function and line to eina_log_print().

--
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--
MSN: barbi...@gmail.com
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202

--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] E SVN: acidx trunk/PROTO/elev8/src/bin

2012-03-06 Thread Leandro Pereira
On Tue, Mar 6, 2012 at 6:36 PM, Gustavo Sverzut Barbieri
barbi...@profusion.mobi wrote:
 did you understand what I mean? you provide JS values for file,
 function and line to eina_log_print().

I do. I'll see how to get a stack trace as well, this might help.

-- 
  Leandro

--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] E SVN: acidx trunk/PROTO/elev8/src/bin

2012-03-05 Thread Gustavo Sverzut Barbieri
On Mon, Mar 5, 2012 at 4:34 PM, Enlightenment SVN
no-re...@enlightenment.org wrote:

 Log:
 elev8: Define the JavaScript module file name

  Error messages are meaningful now:
     ERR11319:elev8 elev8_utils.cc:60 boom() ./app.js:12 TypeError: Object 
 [object Object] has no method 'derp'

  Instead of:
     ERR10664:elev8 elev8_utils.cc:60 boom() undefined:12 TypeError: Object 
 [object Object] has no method 'derp'

As you can see, you should NOT use the eina_log.h MACRO, use the
function instead and provide more meaningful file/line instead of
always doing elev8_utils.cc:60 :-)


--
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--
MSN: barbi...@gmail.com
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202

--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel