ios
ios copied to clipboard
iOS in debug hangs after resuming from devtools breakpoint
Very glad to see devtools console autocomplete suggestions working again after updating to 7.1.0, but unfortunately the latest release seems to have broken other parts of devtools debugging for me.
Reproduction steps:
git clone https://github.com/delaneyb/ns-v8ios-demo-debug-hang
cd ns-v8ios-demo-debug-hang
ns debug ios
- Attach Chrome Devtools (MacOS Chrome 87.0.4280.88 (Official Build) (x86_64))
- Tap on the "Blank-{N}-Vue app" label to trigger the debugger statement in devtools
- Continue execution in devtools
- May have to repeat a few times and eventually the app and devtools will be in a hung state, with no button taps/debugger statement registered and devtools stuck showing "Debugger paused". Xcode debugger shows 100% CPU utilisation with the app in a loop on the following line, and JsV8InspectorClient::quitMessageLoopOnPause not being called as expected when the resume button is pressed in devtools.
https://github.com/NativeScript/ns-v8ios-runtime/blob/ee5ee85bc38b284186ccbbce75b5eea47ec90277/NativeScript/inspector/JsV8InspectorClient.mm#L177-L178
Devices: iPhone 12, iOS 14.2, iPhone 11 simulator i5 16GB 2017 Intel MBP, MacOS Big Sur 11.2 Beta
Stabbing in the dark I've come up with this which seems to somehow prevent hanging but not exactly sure how/why.
JsV8InspectorClient.mm
