Hi,

It seems I've already found an answer - JS debugger is viable under
test_shell after a small change:

Index: WebViewImpl.cpp
===================================================================
--- WebViewImpl.cpp     (revision 53449)
+++ WebViewImpl.cpp     (working copy)
@@ -234,7 +234,11 @@
                         0));

     m_page->backForwardList()->setClient
(&m_backForwardListClientImpl);
-    m_page->setGroupName(pageGroupName);
+
+    char pageGroupNameCurr[100];
+    static int i = 1;
+    sprintf(pageGroupNameCurr, "default%d", i++);
+    m_page->setGroupName(pageGroupNameCurr);
 }

 WebViewImpl::~WebViewImpl()

There is a short description:
When hitting a breakpoint, WebKit pauses all active DOM elements in
the current "Page group". Chrome uses only one page group for all
pages, that's why WebKit pauses all active DOM elements including
these one that belong to DevTools page. Ideally, I think it would be
better to provide an ability to set Page Group name through WebKit API
and set custom "Page group" name for DevTools page. As far as one of
WebKit API goals is to allow third-party developers to build their own
apps on it, do you think it will be useful to extend WebKit API in
this way?

Regards,
Vadim Ridosh

On Jan 18, 7:16 pm, vridosh <vrid...@gmail.com> wrote:
> Hi,
>
> I'm going to start my project based on WebKit API and planning to use
> test_shell as a reference implementation. I also want to use DevTools
> to allow end-user to debug HTML and especially JavaScript.
>
> Could you please tell how viable is the JS debugger in test_shell/
> WebKit API?
>
> As far as I understand, in case of breakpoint V8 debugger stops the
> script execution on the whole process. That problem could be easy
> reproduced while running Chrome in single-process mode (AFAIR, this
> mode is obsolete for modern Chromium browser) - trying to pause script
> execution pauses all JS code, including DevTools JS code too, which
> causes "deadlock" - script couldn't be resumed anymore. As far as I
> understand, that's why Debugger tab was not available in test_shell in
> early Chromium builds. But when I tried to use current test_shell
> build, I was able to pause JS execution on breakpoint and then resume
> JS again. From the other hand, while staying on JS breakpoint not all
> parts of DevTools debugger works well - f.e. I couldn't execute JS in
> console. Also, as I got, pausing JS in any custom place (I mean, left
> button just above watch expressions and call stack) not implemented
> yet it all.
>
> So, the main question is - is it possible at all to make DevTools JS
> debugger in test_shell to work correctly?
>
> I'd appreciate any suggestions.
>
> Regards,
> Vadim Ridosh
-- 
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev

Reply via email to