Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Show Inspector not launching Web Inspector

I'm on Mac OS X Snow Leopard.
Selecting Show Inspector from Window menu does nothing. No Web Inspector.

I am able to launch the inspector using Titanium.UI.getWindows()[0].showInspector() in the sandbox.

Any idea what's going on?

Thanks!

— asked October 4th 2010 by Marc Charnow
  • inspector
  • show
  • web-inspector
5 Comments
  • I have the same problem.

    — commented January 6th 2011 by Brad Parker
  • Same issue. It used to work in older versions, but it's no longer working since I updated.

    — commented February 28th 2011 by Chris Richards
  • I feel dumb. I had a typo in the JavaScript declaration. This works for me:

    <script type="text/javascript">
        Titanium.UI.getCurrentWindow().showInspector(true);
    </script>
    
    — commented February 28th 2011 by Chris Richards
  • Also not working. I'm using the latest 1.2, not able to bring up the inspector on Snow Leopard.

    Tried right clicking, no joy, menu option, no joy, and also that code above, no joy.

    Very frustrating..

    — commented April 18th 2011 by Chris Moore
  • Not working for me either.

    Titanium Studio, build: 1.0.1.201106171427

    Very frustrating indeed.

    — commented July 16th 2011 by Michael Hoover

5 Answers

  • Accepted Answer

    In order to enable the Web Inspector panel in your application on Mac OSX you need to edit the preferences plist file.

    This can be found in ~/Library/Preferences and is named using your application's ID. Open the file with the plist editor and add a new key called "WebKitDeveloperExtras" with type set to boolean. Setting this value to true will allow the Inspector panel to be opened.

    To open Inspector right click on your application and select "Inspect element". This should cause Inspector to open up.

    — answered May 19th 2011 by Matt Apperson
    permalink
    3 Comments
    • That doesn't work for me. I'm sure that I edited the correct plist file (the application ID in tiapp.xml is the file name, with .plist). Opened the .plist with Xcode, added that variable as a new Boolean row, with the value YES, and I still get the error:

      HIToolbox: ignoring exception '*** -[NSURL initFileURLWithPath:]: nil string parameter' that raised inside Carbon event dispatch
      

      Any ideas?

      Titanium Studio, build: 1.0.0.201106101247
      SDK 1.7

      Thanks.

      — commented June 19th 2011 by Elad Ossadon
    • yeah doesn't work. the .plist already has the correct field, and adding the javascript snippet suggested above fatally crashes the app. any other suggestions?

      — commented July 7th 2011 by James Thoburn
    • Doesn't work for me either. Any ideas where to get further guidance on this?

      — commented July 23rd 2011 by Sean Kelly
  • Thank YOU!!!!!!!!!

    That's been bugging me for months!!!!!!

    — answered May 19th 2011 by Chris Moore
    permalink
    0 Comments
  • Didn't work for me either.

    — answered July 25th 2011 by Evan Rees
    permalink
    0 Comments
  • Anyone got any pointers on this? I've seen the plist suggestion (but I believe that's only for 1.2.x onwards?), I'm building on 1.1.0 under Snow Leopard (10.6.8), the plist value already exists, and right clicking and choosing 'Show Inspector' does nothing within the app, but dumps this exception back to the console;

    2011-11-30 09:05:30.859 Desktop-Test[36270:b07] HIToolbox: ignoring exception '*** -[NSURL initFileURLWithPath:]: nil string parameter' that raised inside Carbon event dispatch
    (
        0   CoreFoundation                      0x93c816ca __raiseError + 410
        1   libobjc.A.dylib                     0x935d25a9 objc_exception_throw + 56
        2   CoreFoundation                      0x93c813f8 +[NSException raise:format:arguments:] + 136
        3   CoreFoundation                      0x93c8136a +[NSException raise:format:] + 58
        4   Foundation                          0x93870a88 -[NSURL(NSURL) initFileURLWithPath:] + 90
        5   Foundation                          0x93870a16 +[NSURL(NSURL) fileURLWithPath:] + 72
        6   WebKit                              0x12f6cd36 -[WebInspectorWindowController init] + 806
        7   WebKit                              0x12f6c9d7 -[WebInspectorWindowController initWithInspectedWebView:] + 39
        8   WebKit                              0x12f6e003 _ZN18WebInspectorClient21openInspectorFrontendEPN7WebCore19InspectorControllerE + 67
        9   WebCore                             0x1371f443 _ZN7WebCore19InspectorController4showEv + 67
        10  libtiuimodule.dylib                 0x14bb32e0 _ZN2ti13OSXUserWindow13ShowInspectorEb + 48
        11  AppKit                              0x920d6a26 -[NSApplication sendAction:to:from:] + 112
        12  AppKit                              0x920d68d9 -[NSMenuItem _corePerformAction] + 435
        13  AppKit                              0x920d65ca -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 174
        14  AppKit                              0x920d64b6 -[NSMenu performActionForItemAtIndex:] + 65
        15  AppKit                              0x920d6469 -[NSMenu _internalPerformActionForItemAtIndex:] + 50
        16  AppKit                              0x920d63cf -[NSMenuItem _internalPerformActionThroughMenuIfPossible] + 97
        17  AppKit                              0x920d6313 -[NSCarbonMenuImpl _carbonCommandProcessEvent:handlerCallRef:] + 336
        18  AppKit                              0x920caa55 NSSLMMenuEventHandler + 404
        19  HIToolbox                           0x99a03c2f _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1567
        20  HIToolbox                           0x99a02ef6 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 411
        21  HIToolbox                           0x99a257f3 SendEventToEventTarget + 52
        22  HIToolbox                           0x99a51e87 _ZL18SendHICommandEventmPK9HICommandmmhPKvP20OpaqueEventTargetRefS5_PP14OpaqueEventRef + 448
        23  HIToolbox                           0x99a76b90 SendMenuCommandWithContextAndModifiers + 66
        24  HIToolbox                           0x99a76b47 SendMenuItemSelectedEvent + 121
        25  HIToolbox                           0x99a76a5d _ZL19FinishMenuSelectionP13SelectionDataP10MenuResultS2_ + 152
        26  HIToolbox                           0x99bf8364 _ZL19PopUpMenuSelectCoreP8MenuData5PointdS1_tjPK4RecttmS4_S4_PK10__CFStringPP13OpaqueMenuRefPt + 1857
        27  HIToolbox                           0x99bf86bb _HandlePopUpMenuSelection7 + 678
        28  AppKit                              0x923626e6 _NSSLMPopUpCarbonMenu3 + 3937
        29  AppKit                              0x92362a76 -[NSCarbonMenuImpl _popUpContextMenu:withEvent:forView:withFont:] + 220
        30  AppKit                              0x924db945 -[NSMenu _popUpContextMenu:withEvent:forView:withFont:] + 270
        31  AppKit                              0x924db9e4 -[NSMenu _popUpContextMenu:withEvent:forView:] + 63
        32  AppKit                              0x924db7b7 -[NSMenu _popUpMenuWithEvent:forView:] + 52
        33  AppKit                              0x926d265d -[NSView rightMouseDown:] + 103
        34  AppKit                              0x923c3d1b -[NSControl _rightMouseUpOrDown:] + 534
        35  AppKit                              0x921adb28 -[NSWindow sendEvent:] + 5757
        36  AppKit                              0x920c660b -[NSApplication sendEvent:] + 6431
        37  AppKit                              0x9205a253 -[NSApplication run] + 917
        38  libkhost.dylib                      0x02885cc7 _ZN5kroll4Host7RunLoopEv + 423
        39  libkhost.dylib                      0x0280e0eb _ZN5kroll4Host3RunEv + 251
        40  libkhost.dylib                      0x0280e579 Execute + 73
        41  Desktop-Test                        0x0002155e _ZN9KrollBoot9StartHostEv + 350
        42  Desktop-Test                        0x00022170 main + 480
        43  Desktop-Test                        0x000032ea start + 54
    )
    
    — answered November 30th 2011 by Andy Flisher
    permalink
    1 Comment
    • I am not getting the 'Show Inspector' option on right click. The value is there in plist file but its not displaying it.. Any ideas?

      — commented January 19th 2012 by Priyanka Patel
  • This can be resolved by manually installing the SDK, see this Jira issue for details and this other answer for links to SDK 1.2.0RC6e

    — answered June 12th 2012 by Steve Winter
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.