Open
Description
Via a conversation I had with /u/morginez on reddit (after seeing this comment thread), this person reported some potential issues with breakpoints not being hit (or hit in an unexpected order):
Back then the debugging never really worked at all and I tried to get around it using console.log()-calls.
Breakpoints wouldn't be hit or were hit in a weird, desync-order from what actually happened in the code. I could not really work with the debugging tools at that point.
He has provided a repo of the problem app as well: https://github.com/tihansen/words-challenge/tree/master/app
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
rdlauer commentedon Aug 30, 2019
Note that I'm unsure if this applies to Chrome Dev Tools or VS Code extension - checking with user, might have to move this issue to another repo :)
endarova commentedon Sep 5, 2019
I managed to reproduce problems with the attached project when trying to debug on iOS. The project crashes on iOS so when trying to execute
tns debug iOS --debug-brk
the debugger cannot attach at all and cli throws:Cannot connect to device socket. The error message is 'Timeout while waiting for lock "/Users/test/.local/share/.nativescript-cli/1351a495d63521927464972b906f9356"'.
NativeScript debugger was not able to get inspector socket port on device 859F156F-01E4-42E9-823A-2E843CB71AAB for application org.nativescript.blankng.
Cannot connect to device socket. The error message is 'Device socket port cannot be found.'.
We will have to investigate it further.
Fatme commentedon Oct 9, 2019
Hey guys,
We investigated the problem and were able to reproduce the above mentioned error:
Let's me first explain in short how NativeScript CLI establishes a debugging session with an application on device. When the application is started, it logs the port of inspector socket. NativeScript CLI parses the logs from device and searches for the mentioned port. When the port is found, NativeScript CLI connects to that port and establishes a debugging session.
However, when the application is not successfully started on device or crashes runtime at startup, NativeScript CLI timeouts with the above mentioned error as it is not able to get inspector socket and cannot create a debugging session.
After digging into the problem, it turns out that we had built the application with some beta version of
Xcode
. After building the application with the latest official Xcode, we were not able to reproduce the error anymore. So, can you please execute the following steps on your side and check if that'll resolve the problem:rm -rf platforms
tns debug ios --debug-brk
If the problem is still not resolved with the above steps, can you send us the followings:
tns debug ios --debug-brk --log trace
vallemar commentedon Mar 23, 2021
Same error with NS 7.3
mrwrighty commentedon Dec 16, 2021
Getting error i. 8.1 see my bug report.