feat:fix when debugging,log cannot show on terminal
This commit is contained in:
@@ -163,12 +163,10 @@ - (DoricAsyncResult *)createContext:(NSString *)contextId script:(NSString *)scr
|
||||
|
||||
- (DoricAsyncResult *)destroyContext:(NSString *)contextId {
|
||||
DoricAsyncResult *ret = [[DoricAsyncResult alloc] init];
|
||||
__weak typeof(self) _self = self;
|
||||
NSString *theContextId = self.theContextId;
|
||||
[self.jsExecutor ensureRunOnJSThread:^{
|
||||
__strong typeof(_self) self = _self;
|
||||
if (!self) return;
|
||||
@try {
|
||||
if ([contextId isEqualToString:self.theContextId]) {
|
||||
if ([contextId isEqualToString:theContextId]) {
|
||||
[DoricDev.instance stopDebugging:NO];
|
||||
}
|
||||
[ret setupResult:@YES];
|
||||
|
@@ -23,6 +23,7 @@
|
||||
#import "DoricContext.h"
|
||||
#import "DoricDebugJSEngine.h"
|
||||
#import "DoricRemoteJSExecutor.h"
|
||||
#import "DoricDevMonitor.h"
|
||||
|
||||
@interface DoricDebugJSEngine ()
|
||||
@property(nonatomic, weak) DoricWSClient *wsClient;
|
||||
@@ -33,6 +34,7 @@ @implementation DoricDebugJSEngine
|
||||
- (instancetype)initWithWSClient:(DoricWSClient *)wsClient {
|
||||
if (self = [super init]) {
|
||||
_wsClient = wsClient;
|
||||
[self.registry registerMonitor:[DoricDevMonitor new]];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
@@ -24,7 +24,8 @@
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface DoricDev : NSObject
|
||||
@property(nonatomic, strong) DoricWSClient *wsClient;
|
||||
@property(nonatomic, strong, nullable) DoricWSClient *wsClient;
|
||||
|
||||
+ (instancetype)instance;
|
||||
|
||||
- (void)openDevMode;
|
||||
|
Reference in New Issue
Block a user