Bug 210177 - REGRESSION (Safari 13.1?): Web Inspector: Debugger hang at breakpoint when using Keyboard Maestro
Summary: REGRESSION (Safari 13.1?): Web Inspector: Debugger hang at breakpoint when us...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Local Build
Hardware: Mac macOS 10.15
: P2 Critical
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on: 202716
Blocks:
  Show dependency treegraph
 
Reported: 2020-04-08 02:32 PDT by macdevign
Modified: 2020-04-15 10:37 PDT (History)
6 users (show)

See Also:


Attachments
Running Keyboard Maestro's custom Window with its Web Inspector during debugging. (3.06 MB, image/png)
2020-04-08 02:32 PDT, macdevign
no flags Details
Patch (8.92 KB, patch)
2020-04-10 14:10 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (8.82 KB, patch)
2020-04-11 09:31 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (8.64 KB, patch)
2020-04-11 09:33 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description macdevign 2020-04-08 02:32:43 PDT
Created attachment 395782 [details]
Running Keyboard Maestro's custom Window with its Web Inspector during debugging.

Hi, 
I have updated catalina to recent release 10.15.4 and Xcode to Xcode Version 11.4 (11E146), and have installed the component required by Xcode.

I using a commercial application called Keyboard Maestro ( www.keyboardmaestro.com/) and it has a feature that use webkit call Custom HTML Prompt Action (https://wiki.keyboardmaestro.com/action/Custom_HTML_Prompt) whereby one can use a html file to show in a window. It is able to access web inspector as shown in file attachment. Before update to  10.15.4, the debugger in the web inspector use to work if there is breakpoint, however after update to 10.15.4 and xcode, the debugger hang (a snowball icon show) whenever it stop at breakpoint. All function of web inspector is working except debugger operation.

It seems that something is broken understanding that from https://webkit.org/blog/10247/new-webkit-features-in-safari-13-1/  , webkit get update which may possibly break thing. 

I have no idea what is happening as there are commerical application that using webkit and breaking such thing is disappointing especially this is used for business.

I have attached the image , whereby Test Custom Prompt window is the window created by Keyboard Maestro using its "Custom HTML Prompt Action ", and web inspector is shown, and when button click and stop at breakpoint, the mouse cursor turn snowball , and hang the whole Keyboard Maestro, seem like web inspector's debugger is having issue ?


Can you investigate and fix this issue ?

I am okay with accessing my macbook remotely for troubleshooting and debugging this issue.

thank
Comment 1 macdevign 2020-04-08 02:36:24 PDT
The Keyboard Maestro vendor ask me to file for this issue as it is  webkit's issue.
Comment 2 Radar WebKit Bug Importer 2020-04-08 16:55:37 PDT
<rdar://problem/61485723>
Comment 3 Devin Rousso 2020-04-10 14:10:41 PDT
Created attachment 396120 [details]
Patch
Comment 4 Devin Rousso 2020-04-10 14:12:00 PDT
Comment on attachment 396120 [details]
Patch

Not sure how this has gone unnoticed, but I can see the same symptoms described in this issue using WK1/WebKitLegacy `Tools/Scripts/run-minibrowser` :(
Comment 5 Joseph Pecoraro 2020-04-11 02:00:56 PDT
Comment on attachment 396120 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=396120&action=review

r=me

> Source/WebCore/inspector/mac/PageScriptDebugServerMac.mm:2
> + * Copyright (C) 2020 Apple Inc. All rights reserved.

This is effectively a copy of `Copyright (C) 2008-2018 Apple` code.

> Source/WebCore/inspector/mac/PageScriptDebugServerMac.mm:26
> +#include "config.h"

Style: #import

> Source/WebCore/inspector/mac/PageScriptDebugServerMac.mm:33
> +#endif // PLATFORM(MAC) && ENABLE(WEBPROCESS_NSRUNLOOP)

I don't think the endif comment is useful in this case given the small block. In fact, we often don't even bother with ENABLE guards around an include like this since it would be fine to include for all cases and just not have the symbols be used. It necessary reduces clutter to remove guards around includes. Only if it had a meaningful impact on compile times might it be worth it.

> Source/WebCore/inspector/mac/PageScriptDebugServerMac.mm:51
> +#endif // ENABLE(WEBPROCESS_NSRUNLOOP)

Ditto.
Comment 6 Joseph Pecoraro 2020-04-11 02:02:44 PDT
> It necessary reduces clutter to remove guards around includes.

I meant "It reduces clutter".
Comment 7 Devin Rousso 2020-04-11 09:31:25 PDT
Created attachment 396166 [details]
Patch
Comment 8 Devin Rousso 2020-04-11 09:33:27 PDT
Created attachment 396167 [details]
Patch
Comment 9 EWS 2020-04-11 11:36:44 PDT
Committed r259931: <https://trac.webkit.org/changeset/259931>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 396167 [details].
Comment 10 macdevign 2020-04-14 01:04:07 PDT
Thank for resolving this issue.

Just like to find out that this fix is included in next point release of Catalina/xcode ? And the Keyboard Maestro vendor does not need to make any change to the software ?
Comment 11 Timothy Hatcher 2020-04-14 19:30:46 PDT
It will show up in Safari Technology Preview next. Check the next STP release and see if it resolves the issue for you. Otherwise, we can't comment on future software releases.
Comment 12 BJ Burg 2020-04-15 10:37:01 PDT
Comment on attachment 396120 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=396120&action=review

>> Source/WebCore/inspector/mac/PageScriptDebugServerMac.mm:33
>> +#endif // PLATFORM(MAC) && ENABLE(WEBPROCESS_NSRUNLOOP)
> 
> I don't think the endif comment is useful in this case given the small block. In fact, we often don't even bother with ENABLE guards around an include like this since it would be fine to include for all cases and just not have the symbols be used. It necessary reduces clutter to remove guards around includes. Only if it had a meaningful impact on compile times might it be worth it.

I make an exception for guarding code that we expect to rip out on some timeline, like after a certain release. Is ENABLE(WEBPROCESS_NSRUNLOOP) a permanent thing?