nativescript-community / nativescript-vscode-extension

A Visual Studio Code Extension for NativeScript
https://www.nativescript.org/visual-studio-code
Apache License 2.0
82 stars 32 forks source link

VSCode debugger not attaching correctly only on iOS emulator #147

Open gtso86 opened 7 years ago

gtso86 commented 7 years ago

After some time struggling all my weekend trying to set {N} on my Mac (after several permissions errors) I finally get my workspace up and running. Googling new extensions to VSCode to help me use {N} I found this one and followed this outdated video to see all tips and tricks.

My system info: MacOS Sierra 10.12.5 node 8.4.0 -- nativescript 3.1.3 -- cocoapods 1.3.1 -- xcodeproj 1.5.1 VSCode 1.16.0-insider -- nativescript extension 0.7.2


If I try to work via terminal $ tns run ios|android --emulator, everything looks ok. Live sync is working, both platforms opens the emulator normally, etc...

When I try to attach a debugger on Android. Everything works like the video. I can change variables, etc, BUT If I try to do the same attach on iOS this output appears and live sync stop to working: (In both tests I used the shortcut cmd+alt+I or A to open the emulator)

[NativeScriptCli] execute: tns --analyticsClient VSCode --version [NSDebugAdapter] Using tns CLI v3.1.3 on path 'tns' [NSDebugAdapter] Running tns command... [NativeScriptCli] execute: tns --analyticsClient VSCode debug ios --no-client --start [NSDebugAdapter] Watching the tns CLI output to receive a connection token Searching for devices...

Setting up proxy... Press Ctrl + C to terminate, or disconnect.

socket-file-location: /var/folders/yf/p0gw4m6s6wg6xtc8fyzdnklm0000gn/T/11783-41929-1vggjcc.qx0a.sock

[NSDebugAdapter] Ready to attach to application on /var/folders/yf/p0gw4m6s6wg6xtc8fyzdnklm0000gn/T/11783-41929-1vggjcc.qx0a.sock Suppressing debugging client.

[NSDebugAdapter] Connection to target application established on /var/folders/yf/p0gw4m6s6wg6xtc8fyzdnklm0000gn/T/11783-41929-1vggjcc.qx0a.sock [NSDebugAdapter] Connection to target application successfully enabled Frontend client connected.

Backend socket created.

Error: read ECONNRESET at _errnoException (util.js:1041:11) at TCP.onread (net.js:606:25)

Backend socket closed

Frontend socket closed


I tried to reinstall the package like this issue here #35 but still happen the problem on iOS debug workflow...

Any idea why?

Thanks in advance,

plaramee1 commented 5 years ago

I added VS Code and tns to the Full Disk Access in settings -> security & Privacy and that fixed my issue.