Skip to content

Commit 0dd7c77

Browse files
committed
fix: stop discarding errors in debug
1 parent 90ac16c commit 0dd7c77

6 files changed

Lines changed: 614 additions & 777 deletions

File tree

NativeScript/NativeScript.mm

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@
1010
using namespace v8;
1111
using namespace tns;
1212

13-
namespace tns {
14-
// External flag from Runtime.mm to track JavaScript errors
15-
extern bool jsErrorOccurred;
16-
}
13+
namespace tns {}
1714

1815
@implementation Config
1916

@@ -44,19 +41,6 @@ - (void)runScriptString:(NSString*)script runLoop:(BOOL)runLoop {
4441
- (void)runMainApplication {
4542
runtime_->RunMainScript();
4643

47-
// In debug mode, if JavaScript errors occurred, keep the app alive indefinitely
48-
// This prevents iOS from terminating the app and allows hot-reload to work
49-
if (RuntimeConfig.IsDebug && jsErrorOccurred) {
50-
// Log(@"Debug mode - JavaScript errors detected, entering infinite run loop to prevent app termination");
51-
52-
while (true) {
53-
CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.1, true);
54-
tns::Tasks::Drain();
55-
}
56-
// Note: This line is never reached in debug mode with errors
57-
}
58-
59-
// Normal execution path (no errors or release mode)
6044
CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, true);
6145
tns::Tasks::Drain();
6246
}

0 commit comments

Comments
 (0)