NativeScript / NativeScript/ios

iOS in debug hangs after resuming from devtools breakpoint

Open
#95 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
150
Forks
43
Avg merge
3d 10h
Merged PRs (30d)
22

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Use ns-v8ios-demo-debug-hang and reproduce with ns debug ios, Chrome DevTools, and the debugger statement. Inspect NativeScript/inspector/JsV8InspectorClient.mm around lines 177-178 and observe the Xcode loop when DevTools resumes. Done means repeated pause/resume cycles no longer hang the app or leave DevTools stuck at “Debugger paused”.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, javascript
Domain
devtools, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.