28#ifndef OO_EXCLUDE_DEBUG_SUPPORT
43#define LoadDebugPlugIn() nil
50@interface NSObject (OODebugPlugInController)
59 NSString *debugOXPPath =
nil;
60 NSDictionary *debugSettings =
nil;
61 NSString *consoleHost =
nil;
62 unsigned short consolePort = 0;
63 id<OODebuggerInterface> debugger =
nil;
64 BOOL activateDebugConsole = NO;
74 if (debugOXPPath !=
nil)
79 consoleHost = [debugSettings oo_stringForKey:@"console-host"];
80 consolePort = [debugSettings oo_unsignedShortForKey:@"console-port"];
85 debugger = [sDebugPlugInController setUpDebugger];
94 [debugger autorelease];
98 activateDebugConsole = (debugger !=
nil);
101 if (!activateDebugConsole)
103 activateDebugConsole = [debugSettings oo_boolForKey:@"always-load-debug-console"];
107 if (activateDebugConsole)
122 id debugController =
nil;
124 NSURL *plugInURL = NSBundle.mainBundle.builtInPlugInsURL;
125 plugInURL = [plugInURL URLByAppendingPathComponent:@"Debug.bundle"];
126 NSBundle *debugBundle = [NSBundle bundleWithURL:plugInURL];
128 if ([debugBundle load])
130 Class principalClass = debugBundle.principalClass;
131 if (principalClass != Nil)
134 debugController = [[principalClass new] autorelease];
138 OOLog(
@"debugSupport.load.failed",
@"Failed to find principal class of debug bundle.");
143 OOLog(
@"debugSupport.load.failed",
@"Failed to load debug OXP plug-in from %@.", plugInURL.path);
148 return debugController;
#define OO_DEBUG_POP_PROGRESS()
#define OO_DEBUG_PUSH_PROGRESS(...)
static id sDebugPlugInController
void OOInitDebugSupport(void)
#define LoadDebugPlugIn()
#define OOLog(class, format,...)
id< OODebuggerInterface > setUpDebugger()
BOOL setDebugger:(id< OODebuggerInterface > debugger)
OODebugMonitor * sharedDebugMonitor()
void setUsingPlugInController:(BOOL flag)
void enableDebuggerStatement()
OOJavaScriptEngine * sharedEngine()
NSString * pathForFileNamed:inFolder:(NSString *fileName,[inFolder] NSString *folderName)
NSDictionary * dictionaryFromFilesNamed:inFolder:mergeMode:cache:(NSString *fileName,[inFolder] NSString *folderName,[mergeMode] OOResourceMergeMode mergeMode,[cache] BOOL useCache)