[ 
https://issues.apache.org/jira/browse/CB-8313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14278789#comment-14278789
 ] 

Patrick Mueller commented on CB-8313:
-------------------------------------

Sorry, I was suggesting YOU can queue up your messages, and then set a timeout 
to log them to the console.  You are correct that I can't really do that from 
weinre, unless I provided some sort of setting for that.

It's a complex situation; you can actually connect/disconnect from your weinre 
target from within the same browser client session (ie, the browser session 
showing the weinre/web inspector user interface), or across multiple browser 
client sessions (across multiple machines even).  Ideally, you'd want to 
"queue" all the messages generated while not connected, and then when 
connected, display them all.  Only the first connection after having no 
connections would see the messages; connect with another client session a 
second later, they'd see none of the queued messages.

I'm making use of the webkit web inspector protocol for generating message 
events, which given the communication pattern between debug targets and 
clients, means there are cases for loss.  We'd need to come up with a 
completely different protocol for dealing with console messages statefully.  
Which is a lot of non-trivial code.

Given the current state of debuggers in iOS and Android, that can be used 
instead of weinre, I can't really justify investing in this myself.  If you - 
or anyone else - wants to give it a go, I'm happy to work with you on the 
initial design and implementation.



> How to know when the connection is ready?
> -----------------------------------------
>
>                 Key: CB-8313
>                 URL: https://issues.apache.org/jira/browse/CB-8313
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: weinre
>         Environment: MacOSX latest Yosemite, Firefox latest Nightly
> Weinre 2.0.0-pre-I0Z7U9OV
>            Reporter: _kud
>            Assignee: Patrick Mueller
>            Priority: Blocker
>
> As I can see, the project redefines console. Though, when the scope is 
> private or/and used with browserify, the console.log doesn't work. I have no 
> return.
> Though, if I do:
> ```
> video.addEventListener( 'play', function() {
>     console.log( 'hello' )
> })
> ```
> in my code, it seems to work.
> Do you have any idea why?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to