[jira] [Commented] (CB-3494) Enable script debugging

2013-05-24 Thread Patrick Mueller (JIRA)

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

Patrick Mueller commented on CB-3494:
-

The debug protocol bit is in WebKit, but that doesn't mean it's enabled by the 
browsers or browser controls (WebView/UiWebView).

Even for iOS6, the debug protocol isn't something you really have access to.  
Desktop Safari and mobile WebKit talk to each other via secret USB protocols, 
for instance.

> Enable script debugging
> ---
>
> Key: CB-3494
> URL: https://issues.apache.org/jira/browse/CB-3494
> Project: Apache Cordova
>  Issue Type: New Feature
>  Components: weinre
> Environment: Server: OSX
> Target: Android 4.0.3, Cordova 2.7.0
>Reporter: Martin Naumann
>Assignee: Patrick Mueller
>  Labels: javascript, newbie
>
> Debugging Javascript in a cordova application or on any mobile target would 
> be very handy and many colleagues requested it or expressed the need for it.
> It would be great to be able to set / unset breakpoints in Javascript 
> (executing on the target device) and see the "Scripts" panel, that 
> WebInspector provides.
> I tried enabling the scripts panel / JS debugger but I think I need some 
> poking in the right direction here, as I got stuck.
> I got to this point: https://pbs.twimg.com/media/BK-16yOCMAEmm9K.png:large

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CB-3494) Enable script debugging

2013-05-24 Thread Martin Naumann (JIRA)

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

Martin Naumann commented on CB-3494:


I just wondered, because - at least for Chrome on Android - there apparently is 
an API to do all that: 
https://developers.google.com/chrome-developer-tools/docs/protocol/1.0/debugger

And it seems to be part of WebKit for quite a while: 
https://www.webkit.org/blog/1875/announcing-remote-debugging-protocol-v1-0/

But the Aardwulf approach is perfectly fine for me, I'm going to look into it, 
thanks!

> Enable script debugging
> ---
>
> Key: CB-3494
> URL: https://issues.apache.org/jira/browse/CB-3494
> Project: Apache Cordova
>  Issue Type: New Feature
>  Components: weinre
> Environment: Server: OSX
> Target: Android 4.0.3, Cordova 2.7.0
>Reporter: Martin Naumann
>Assignee: Patrick Mueller
>  Labels: javascript, newbie
>
> Debugging Javascript in a cordova application or on any mobile target would 
> be very handy and many colleagues requested it or expressed the need for it.
> It would be great to be able to set / unset breakpoints in Javascript 
> (executing on the target device) and see the "Scripts" panel, that 
> WebInspector provides.
> I tried enabling the scripts panel / JS debugger but I think I need some 
> poking in the right direction here, as I got stuck.
> I got to this point: https://pbs.twimg.com/media/BK-16yOCMAEmm9K.png:large

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CB-3494) Enable script debugging

2013-05-24 Thread Patrick Mueller (JIRA)

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

Patrick Mueller commented on CB-3494:
-

The problem is this.  Web Inspector (and Chrome DevTools) use a lot of native 
code to do what they do.  Stuff that you can't do from just JavaScript.

weinre contains no native code, it's all JavaScript, so weinre can't do 
anything that you can't do from JavaScript.  Turns out, there's a lot we can do 
in JavaScript!  We can get all the DOM and CSSOM information for the Elements 
panel (well, not all of it, but a lot of it), we can enable the Console 
functionality, etc.

Problem with the Scripts panel is that it all relies on native code.  There's 
no JavaScript API we can use in the browser to "set breakpoints".  There's no 
way in JavaScript to "stop at a breakpoint" and return information about your 
state.

The best answer would seem to be the Aardwolf approach, which requires scripts 
to be pre-processed to include debugging information.  If you REALLY want to 
add JS debugging to weinre, I would suggest that approach.

> Enable script debugging
> ---
>
> Key: CB-3494
> URL: https://issues.apache.org/jira/browse/CB-3494
> Project: Apache Cordova
>  Issue Type: New Feature
>  Components: weinre
> Environment: Server: OSX
> Target: Android 4.0.3, Cordova 2.7.0
>Reporter: Martin Naumann
>Assignee: Patrick Mueller
>  Labels: javascript, newbie
>
> Debugging Javascript in a cordova application or on any mobile target would 
> be very handy and many colleagues requested it or expressed the need for it.
> It would be great to be able to set / unset breakpoints in Javascript 
> (executing on the target device) and see the "Scripts" panel, that 
> WebInspector provides.
> I tried enabling the scripts panel / JS debugger but I think I need some 
> poking in the right direction here, as I got stuck.
> I got to this point: https://pbs.twimg.com/media/BK-16yOCMAEmm9K.png:large

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CB-3494) Enable script debugging

2013-05-23 Thread Martin Naumann (JIRA)

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

Martin Naumann commented on CB-3494:


[~purplecabbage]
Sorry, it's been a long day but I'd like to contribute to Weinre.
Edited the issue to make it clearer.

It may be non-trivial, but the tools should be there.
WebInspector, for example, contains the "Scripts" panel and hints to a 
Javascript Debugger, which isn't enabled.

Sure there is the Safari debugger and sure for Chrome on Android there is 
remote web debugging - but why not have it in Weinre?

I basically want the ability to set/unset breakpoints and if I'm really lucky 
watch expressions, scope etc.

[~pmuellr]
The joys of open source. I digged into the code, found the DebuggerModel, 
DebuggerDispatcher, some hints in 
vendor/webkit/WebCore/inspector/InjectedScriptHost.idl and the hidden "Scripts" 
Panel.
For there I started trying.
Aardwolf would be a good starting point and seeing that Chrome on Android has a 
debugger protocol 
(https://developers.google.com/chrome-developer-tools/docs/debugger-protocol) I 
think there's some development in this direction, so maybe it will be easier in 
the future..

> Enable script debugging
> ---
>
> Key: CB-3494
> URL: https://issues.apache.org/jira/browse/CB-3494
> Project: Apache Cordova
>  Issue Type: New Feature
>  Components: weinre
> Environment: Server: OSX
> Target: Android 4.0.3, Cordova 2.7.0
>Reporter: Martin Naumann
>Assignee: Patrick Mueller
>  Labels: javascript, newbie
>
> Debugging Javascript in a cordova application or on any mobile target would 
> be very handy and many colleagues requested it or expressed the need for it.
> It would be great to be able to set / unset breakpoints in Javascript 
> (executing on the target device) and see the "Scripts" panel, that 
> WebInspector provides.
> I tried enabling the scripts panel / JS debugger but I think I need some 
> poking in the right direction here, as I got stuck.
> I got to this point: https://pbs.twimg.com/media/BK-16yOCMAEmm9K.png:large

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CB-3494) Enable script debugging

2013-05-23 Thread Patrick Mueller (JIRA)

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

Patrick Mueller commented on CB-3494:
-

Not sure what you did to get as far as you did.

But as far as I know, it's non-trivial to enable script debugging for weinre.  
Best thing we could do is something like 
[Aardwolf|https://github.com/lexandera/Aardwolf].  I've never thought it was 
worth the effort.  

* for iOS >= 6, you can use remote debugging with Safari on a Mac.
* for the Chrome browser on Android, you can also do remote debugging with 
Chrome on your desktop, not much help for Cordova apps though.
* recent Blackberry devices have supported remote debugging as well



> Enable script debugging
> ---
>
> Key: CB-3494
> URL: https://issues.apache.org/jira/browse/CB-3494
> Project: Apache Cordova
>  Issue Type: New Feature
>  Components: weinre
>Reporter: Martin Naumann
>Assignee: Patrick Mueller
>  Labels: javascript, newbie
>
> Debugging Javascript in a cordova application or on any mobile target would 
> be very handy and many colleagues requested it or expressed the need for it.
> I tried enabling the scripts panel / JS debugger but I think I need some 
> poking in the right direction here, as I got stuck.
> I got to this point: https://pbs.twimg.com/media/BK-16yOCMAEmm9K.png:large

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CB-3494) Enable script debugging

2013-05-23 Thread Jesse MacFadyen (JIRA)

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

Jesse MacFadyen commented on CB-3494:
-

Pretty vague request.  
What platform are you having the issue on? 
What aspect of 'script debugging' are you asking for? 
Remote debugging? or on the device?

> Enable script debugging
> ---
>
> Key: CB-3494
> URL: https://issues.apache.org/jira/browse/CB-3494
> Project: Apache Cordova
>  Issue Type: New Feature
>  Components: weinre
>Reporter: Martin Naumann
>Assignee: Patrick Mueller
>  Labels: javascript, newbie
>
> Debugging Javascript in a cordova application or on any mobile target would 
> be very handy and many colleagues requested it or expressed the need for it.
> I tried enabling the scripts panel / JS debugger but I think I need some 
> poking in the right direction here, as I got stuck.
> I got to this point: https://pbs.twimg.com/media/BK-16yOCMAEmm9K.png:large

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira