Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Console log debug doesn't work on macOS #1032

Open
ttytm opened this issue Sep 25, 2023 · 0 comments
Open

Console log debug doesn't work on macOS #1032

ttytm opened this issue Sep 25, 2023 · 0 comments

Comments

@ttytm
Copy link
Contributor

ttytm commented Sep 25, 2023

What programming language are you using?

C

Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin22.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Repro
E.g. examples/bind.c: adding a console.log to the tap button (#L64) and enabling debug (#L145):

What did you expect to see and what you saw instead?

Console logs in debug mode are printed to the terminal.

Additional Information

Initially, I encountered the problem when using the V binding.
Additionally, when running an example there and using Inspect Element in the UI to open the webview console on macOS we get a runtime warning:

2023-09-25 03:53:04.148 v-js-interop-simple[17757:5007724] NSWindow warning: adding an unknown subview: <WKInspectorWKWebView: 0x14b71b8b0>. Break on NSLog to debug.
2023-09-25 03:53:04.168 v-js-interop-simple[17757:5007724] Call stack:
(
        0   AppKit                              0x0000000195fb9790 -[NSThemeFrame addSubview:] + 116
        1   AppKit                              0x0000000195fb9470 -[NSView addSubview:positioned:relativeTo:] + 176
        2   AppKit                              0x0000000195fb933c -[NSThemeFrame addSubview:positioned:relativeTo:] + 52
        3   WebKit                              0x00000001b3deed10 _ZN6WebKit19WebInspectorUIProxy14platformAttachEv + 340
        4   WebKit                              0x00000001b3fcd874 _ZN6WebKit19WebInspectorUIProxy4openEv + 156
        5   WebKit                              0x00000001b4231948 _ZN6WebKit19WebInspectorUIProxy17didReceiveMessageERN3IPC10ConnectionERNS1_7DecoderE + 184
        6   WebKit                              0x00000001b432a210 _ZN3IPC18MessageReceiverMap15dispatchMessageERNS_10ConnectionERNS_7DecoderE + 264
        7   WebKit                              0x00000001b3f72fec _ZN6WebKit15WebProcessProxy17didReceiveMessageERN3IPC10ConnectionERNS1_7DecoderE + 40
        8   WebKit                              0x00000001b4325a00 _ZN3IPC10Connection15dispatchMessageENSt3__110unique_ptrINS_7DecoderENS1_14default_deleteIS3_EEEE + 332
        9   WebKit                              0x00000001b4325eac _ZN3IPC10Connection24dispatchIncomingMessagesEv + 284
        10  JavaScriptCore                      0x00000001ad18c0c4 _ZN3WTF7RunLoop11performWorkEv + 200
        11  JavaScriptCore                      0x00000001ad18cf90 _ZN3WTF7RunLoop11performWorkEPv + 36
        12  CoreFoundation                      0x0000000192d7263c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
        13  CoreFoundation                      0x0000000192d725d0 __CFRunLoopDoSource0 + 176
        14  CoreFoundation                      0x0000000192d72340 __CFRunLoopDoSources0 + 244
        15  CoreFoundation                      0x0000000192d70f48 __CFRunLoopRun + 828
        16  CoreFoundation                      0x0000000192d704b8 CFRunLoopRunSpecific + 612
        17  HIToolbox                           0x000000019c5c2df0 RunCurrentEventLoopInMode + 292
        18  HIToolbox                           0x000000019c5c2c2c ReceiveNextEventCommon + 648
        19  HIToolbox                           0x000000019c5c2984 _BlockUntilNextEventMatchingListInModeWithFilter + 76
        20  AppKit                              0x0000000195f9797c _DPSNextEvent + 636
        21  AppKit                              0x0000000195f96b18 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 716
        22  AppKit                              0x0000000195f8af7c -[NSApplication run] + 464
        23  v-js-interop-simple                 0x0000000100972d78 _ZN7webview6detail4objc6invokeIvPFvvEJP11objc_objectP13objc_selectorEEET_T0_DpT1_ + 40
        24  v-js-interop-simple                 0x000000010096f814 _ZN7webview6detail4objc8msg_sendIvJP11objc_objectP13objc_selectorEEET_DpT0_ + 40
        25  v-js-interop-simple                 0x000000010096d854 _ZN7webview6detail22cocoa_wkwebview_engine3runEv + 60
        26  v-js-interop-simple                 0x000000010096d80c webview_run + 24
        27  v-js-interop-simple                 0x00000001009a8918 webview__Webview_run + 24
        28  v-js-interop-simple                 0x00000001009aa028 main__main + 288
        29  v-js-interop-simple                 0x00000001009aa350 main + 88
        30  dyld                                0x000000019293bf28 start + 2236
)

related issue: ttytm/webview#27

@ttytm ttytm changed the title Console log debug doesn't work on macIS Console log debug doesn't work on macOS Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant