Javascript debugging not working via remote debugging?

306 views
Skip to first unread message

jami...@google.com

unread,
Sep 11, 2012, 7:02:41 PM9/11/12
to google-chrome-...@googlegroups.com
Hi,
Is remote debugging of JavaScript code expected to work?  For me, on Chrome 22 beta (Linux) or 21 (Mac), remote debugging works nicely for examining the DOM structure, but not for working with JavaScript.

I'm working on event listeners that are hooked up to FOCUS/BLUR events, and remote debugging would be a great way to work with this code without the debugger window (e.g. just clicking "next line") disturbing focus.

Unfortunately, browsing the code doesn't work when connected remotely, and breaking on DOM changes only begins to work. I can right-click on an element of interest in the DOM view and select "break on attributes modification", go to the other Chrome instance and make the right JavaScript trigger; execution does pause, and I do see a stack trace, but the JavaScript source doesn't show up, and "resuming" doesn't actually free the target app to go forward. Instead, the target sits in "Paused in debugger" indefinitely.

(When hooking up a mac debugger view to a target chrome instance on Linux, via ssh, the pause/step buttons don't even show up - the keyboard shortcuts appear to work, though the target instance remains stuck.)

Any thoughts or recommendations on how to get this to work?  The javascript is served up dynamically by my app, which could present some complexity, though it works fine with conventional non-remote debugging.

Thanks!  
  -- Jamie

p.s. Chrome Devtools rock, by the way.

Yury Semikhatsky

unread,
Sep 12, 2012, 1:40:56 AM9/12/12
to jami...@google.com, google-chrome-...@googlegroups.com
On Wed, Sep 12, 2012 at 3:02 AM, <jami...@google.com> wrote:
Hi,
Is remote debugging of JavaScript code expected to work?  For me, on Chrome 22 beta (Linux) or 21 (Mac), remote debugging works nicely for examining the DOM structure, but not for working with JavaScript.

I'm working on event listeners that are hooked up to FOCUS/BLUR events, and remote debugging would be a great way to work with this code without the debugger window (e.g. just clicking "next line") disturbing focus.

Unfortunately, browsing the code doesn't work when connected remotely,
Does it mean that  you don't see scrips in the Sources panel?

 
and breaking on DOM changes only begins to work. I can right-click on an element of interest in the DOM view and select "break on attributes modification", go to the other Chrome instance and make the right JavaScript trigger; execution does pause, and I do see a stack trace, but the JavaScript source doesn't show up, and "resuming" doesn't actually free the target app to go forward. Instead, the target sits in "Paused in debugger" indefinitely.
I checked this with a couple of simple scenarios and it worked just fine for me like with in-browser debugger. Do you have a reproduction case that you could share with us?

Jamison Gray

unread,
Sep 12, 2012, 2:12:38 PM9/12/12
to Yury Semikhatsky, google-chrome-...@googlegroups.com
Hi Yury,


On Tue, Sep 11, 2012 at 10:40 PM, Yury Semikhatsky <yu...@chromium.org> wrote:
On Wed, Sep 12, 2012 at 3:02 AM, <jami...@google.com> wrote:
Hi,
Is remote debugging of JavaScript code expected to work?  For me, on Chrome 22 beta (Linux) or 21 (Mac), remote debugging works nicely for examining the DOM structure, but not for working with JavaScript.
<snip>

Unfortunately, browsing the code doesn't work when connected remotely,
Does it mean that  you don't see scrips in the Sources panel?

Correct, the tabs in the Scripts panel are blank.
 
 
and breaking on DOM changes only begins to work. I can right-click on an element of interest in the DOM view and select "break on attributes modification", go to the other Chrome instance and make the right JavaScript trigger; execution does pause, and I do see a stack trace, but the JavaScript source doesn't show up, and "resuming" doesn't actually free the target app to go forward. Instead, the target sits in "Paused in debugger" indefinitely.
I checked this with a couple of simple scenarios and it worked just fine for me like with in-browser debugger. Do you have a reproduction case that you could share with us?

I'll see whether I can narrow it down, or whether it works for me with some simpler code setups. 
 

Vsevolod Vlasov

unread,
Sep 20, 2012, 4:12:37 AM9/20/12
to Jamison Gray, Yury Semikhatsky, google-chrome-...@googlegroups.com
I have identified two problems here.

2) We have also found a text editor regression - it loads extremely slowly on huge files (several hundred of thousand lines).
--
Thank you,
Vsevolod Vlasov (vse...@google.com)

Vsevolod Vlasov

unread,
Sep 24, 2012, 4:04:09 PM9/24/12
to Jamison Gray, Pavel Feldman, Yury Semikhatsky, google-chrome-...@googlegroups.com
+pfeldman, who is working on the fix.

On Mon, Sep 24, 2012 at 9:52 PM, Jamison Gray <jami...@google.com> wrote:
Thanks, Vsevolod! Is there any way to work around the socket buffer size? From looking at the code, it looks like it's hardcoded rather than a configurable parameter...

Jamison Gray

unread,
Sep 24, 2012, 1:52:52 PM9/24/12
to Vsevolod Vlasov, Yury Semikhatsky, google-chrome-...@googlegroups.com
Thanks, Vsevolod! Is there any way to work around the socket buffer size? From looking at the code, it looks like it's hardcoded rather than a configurable parameter...
On Thu, Sep 20, 2012 at 1:12 AM, Vsevolod Vlasov <vse...@google.com> wrote:

Pavel Feldman

unread,
Sep 26, 2012, 9:34:04 AM9/26/12
to Vsevolod Vlasov, Jamison Gray, Yury Semikhatsky, google-chrome-...@googlegroups.com
I'm working on fixing it. It involves restoring the blocking socket implementation and running our server in the new thread. Hold on, I'm planning to complete it this week.

Regards
Pavel

Jamison Gray

unread,
Oct 9, 2012, 3:36:19 PM10/9/12
to Pavel Feldman, Vsevolod Vlasov, Yury Semikhatsky, google-chrome-...@googlegroups.com
Hi Pavel,
Just checking in - any update on when remote debugging will be usable
with Gmail's code size?

Let me know if there's any way I can help - Aliese Zacharias sent some
test account info to @yuriys and @vsevik that will give access to a
debug-enabled version of Gmail.

Regards,
-- Jamie

mikewa...@google.com

unread,
Jan 2, 2013, 2:55:30 PM1/2/13
to google-chrome-...@googlegroups.com, Pavel Feldman, Vsevolod Vlasov, Yury Semikhatsky
Any update on this? Would it be worth having one of us try again to see if remote debugging is feasible for Gmail?

Pavel Feldman

unread,
Jan 2, 2013, 3:03:21 PM1/2/13
to mikewa...@google.com, Yury Semihatski, google-chrome-...@googlegroups.com, Vsevolod Vlasov

Please do. I fixed the buffer limitation a while ago and it should work now.

Regards
Pavel

mikewa...@google.com

unread,
Jan 2, 2013, 8:04:43 PM1/2/13
to google-chrome-...@googlegroups.com, mikewa...@google.com, Yury Semihatski, Vsevolod Vlasov, pfel...@google.com
I'm able to perform basic functions, like inspecting elements, setting, and triggering breakpoints. Thanks Pavel.
Reply all
Reply to author
Forward
0 new messages