开发者

Appcelerator Titanium Studio 1.0.1: How to show Inspector on OS X Desktop apps?

开发者 https://www.devze.com 2023-03-14 14:12 出处:网络
When I choose to show the inspector inside a desktop app, I get the error below. As their Wiki said, I\'ve followed this:

When I choose to show the inspector inside a desktop app, I get the error below.

As their Wiki said, I've followed this: http://wiki.appcelerator.org/display/guides/Enabling+Web+Inspector+on+Mac+OSX+in+Desktop+1.2.0 But couldn't get it work. I'm sure that I edited the correct file (same as my App ID .plist). Edited with Xcode, added new row, type = Boolean, key = WebKitDeveloperExtras, value = YES.

Every time I click "Show Inspector" (right click menu) I get this error in the console:

2011-06-20 19:36:17.656 My App [53516:b07] HIToolbox: ignoring exception '*** -[NSURL initFileURLWithPath:]: nil string parameter' that raised inside Carbon event dispatch
(
    0   CoreFoundation                      0x961086ca __raiseError + 410
    1   libobjc.A.dylib                     0x98067509 objc_exception_throw + 56
    2   CoreFoundation                      0x961083f8 +[NSException raise:format:arguments:] + 136
    3   CoreFoundation                      0x9610836a +[NSException raise:format:] + 58
    4   Foundation                          0x97d2fe94 -[NSURL(NSURL) initFileURLWithPath:] + 90
    5   Foundation                          0x97d2fe22 +[NSURL(NSURL) fileURLWithPath:] + 72
    6   WebKit                              0x1405bd36 -[WebInspectorWindowController init] + 806
    7   WebKit                              0x1405b9d7 -[WebInspectorWindowController initWithInspectedWebView:] + 39
    8   WebKit                              0x1405d003 _ZN18WebInspectorClient21openInspectorFrontendEPN7WebCore19InspectorControllerE + 67
    9   WebCore                             0x1480e443 _ZN7WebCore19InspectorController4showEv + 67
    10  libtiuimodule.dylib                 0x037152e0 _ZN2ti13OSXUserWindow13ShowInspectorEb + 48
    11  AppKit                              0x92424c4a -[NSApplication sendAction:to:from:] + 112
    12  AppKit                              0x92424afd -[NSMenuItem _corePerformAction] + 435
    13  AppKit                              0x924247ef -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 174
    14  AppKit                              0x924246de -[NSMenu performActionForItemAtIndex:] + 65
    15  AppKit                              0x92424691 -[NSMenu _internalPerformActionForItemAtIndex:] + 50
    16  AppKit                              0x924245f7 -[NSMenuItem _internalPerformActionThroughMenuIfPossible] + 97
    17  AppKit                              0x9242453b -[NSCarbonMenuImpl _carbonCommandProcessEvent:handlerCallRef:] + 336
    18  AppKit                              0x92418c7d NSSLMMenuEventHandler + 404
    19  HIToolbox                           0x93b3ec0f _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1567
    20  HIToolbox                           0x93b3ded6 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 411
    21  HIToolbox                           0x93b60773 SendEventToEventTarget + 52
    22  HIToolbox                           0x93b8cdc7 _ZL18SendHICommandEventmPK9HICommandmmhPKvP20OpaqueEventTargetRefS5_PP14OpaqueEventRef + 448
    23  HIToolbox                           0x93bb1b38 SendMenuCommandWithContextAndModifiers + 66
    24  HIToolbox                           0x93bb1aef SendMenuItemSelectedEvent + 121
    25  HIToolbox                           0x93bb19f7 _ZL19FinishMenuSelectionP13SelectionDataP10MenuResultS2_ + 152
    26  HIToolbox                           0x93d3337e _ZL19PopUpMenuSelectCoreP8MenuData5PointdS1_tjPK4RecttmS4_S4_PK10__CFStringPP13OpaqueMenuRefPt + 1857
    27  HIToolbox                           0x93d336d5 _HandlePopUpMenuSelection7 + 678
    28  开发者_开发百科AppKit                              0x926aed2e _NSSLMPopUpCarbonMenu3 + 3937
    29  AppKit                              0x926af0be -[NSCarbonMenuImpl _popUpContextMenu:withEvent:forView:withFont:] + 220
    30  AppKit                              0x92827ef5 -[NSMenu _popUpContextMenu:withEvent:forView:withFont:] + 270
    31  AppKit                              0x92827f94 -[NSMenu _popUpContextMenu:withEvent:forView:] + 63
    32  AppKit                              0x92827d67 -[NSMenu _popUpMenuWithEvent:forView:] + 52
    33  AppKit                              0x92a1ec55 -[NSView rightMouseDown:] + 103
    34  AppKit                              0x92710367 -[NSControl _rightMouseUpOrDown:] + 534
    35  AppKit                              0x924fbd3c -[NSWindow sendEvent:] + 5757
    36  AppKit                              0x92414833 -[NSApplication sendEvent:] + 6431
    37  AppKit                              0x923a8307 -[NSApplication run] + 917
    38  libkhost.dylib                      0x02f85cc7 _ZN5kroll4Host7RunLoopEv + 423
    39  libkhost.dylib                      0x02f0e0eb _ZN5kroll4Host3RunEv + 251
    40  libkhost.dylib                      0x02f0e579 Execute + 73
    41  My App                              0x0002155e _ZN9KrollBoot9StartHostEv + 350
    42  My App                              0x00022170 main + 480
    43  My App                              0x000032ea start + 54
)


"Setting this value to true will allow the Inspector panel to be opened." According to the guide you posted it needs to be set to true not YES.


This isn't really an "answer", except to say that this problem seems to be here and noone's found a decent workaround or solution.

Apart from this question there are also 3 separate questions on Appcelerator's own Q&A site:

  • Inspector in Titanium Desktop
  • Show Inspector on OS X Desktop apps results an error and
  • Show Inspector not launching Web Inspector

The last of which thinks it's been answered by the ~/Library/Preferences/*.plist fix that Brian Huenefeld suggested (which I, elado and other users have found doesn't work.)

The problem seems to affect all my Titanium apps, not just the one I first noticed the problem on, and I've also tried adding the key to Titanium Studio's own Plist file without success.

I've also tried erasing the Plist file, and the Application support folder for the app too, all to no avail.

I don't think I need explain any further how frustrating it is working without the javascript debugger in the inspector panel, especially when studio has no debugging capabilities on its own other than trace!

0

精彩评论

暂无评论...
验证码 换一张
取 消