Appcelerator Titanium Studio 1.0.1:如何在 OS X 桌面应用程序上显示 Inspector?
当我选择在桌面应用程序中显示检查器时,出现以下错误。
正如他们的维基所说,我遵循的是: http://wiki .appcelerator.org/display/guides/Enabling+Web+Inspector+on+Mac+OSX+in+Desktop+1.2.0 但无法让它发挥作用。我确信我编辑了正确的文件(与我的应用程序 ID .plist 相同)。使用 Xcode 编辑,添加新行,类型 = Boolean,键 = WebKitDeveloperExtras,值 = YES。
每次我单击“显示检查器”(右键单击菜单)时,我都会在控制台中收到此错误:
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
)
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
)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
“将此值设置为true将允许打开检查器面板。”根据您发布的指南,需要将其设置为
true
而不是YES
。"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
notYES
.这并不是真正的“答案”,只是说这个问题似乎就在这里并且没有人找到像样的解决方法或解决方案。
除了这个问题之外,Appcelerator 自己的问答网站上还有 3 个单独的问题:
和
最后一个认为它已由
~/Library/Preferences/*.plist
解决了 Brian Huenefeld 建议(我,elado 和其他用户发现不起作用。)这个问题似乎影响了我所有的 Titanium 应用程序,而不仅仅是我第一次注意到这个问题的应用程序,而且我还尝试将密钥添加到 Titanium Studio 的自己的 Plist 文件没有成功。
我还尝试删除 Plist 文件以及该应用程序的应用程序支持文件夹,但均无济于事。
我认为我不需要进一步解释在检查器面板中没有 javascript 调试器的情况下它是多么令人沮丧,特别是当 studio 除了跟踪之外没有自己的调试功能时!
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:
and
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!