Skip to content

Mac OS Monterey + IOS Simulator. Debugger isn't attached. #293

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
valera1401 opened this issue Jul 8, 2022 · 7 comments
Closed

Mac OS Monterey + IOS Simulator. Debugger isn't attached. #293

valera1401 opened this issue Jul 8, 2022 · 7 comments

Comments

@valera1401
Copy link

Run the app with VS Code "Launch on IOS".

Got the output:

Opened localhost 41000

To start debugging, open the following URL in Chrome:
devtools://devtools/bundled/inspector.html?ws=localhost:41000

Successfully synced application org.nativescript.HelloWorld on device 5918A21E-3828-4893-9EEC-05053567499F.

[NSDebugAdapter] Ready to attach to application on 41000

Debugging is stopped

Open the link in Google Chrome
devtools://devtools/bundled/inspector.html?ws=localhost:41000

Click "Reconnect DevTools" multiple times.
What I've noticed is that interval between reconnections is increased with the next reconnection.

Run the app with VS Code "Launch on IOS".
Debugging is working.

We couldn't reproduce the behavior on mac with Big Sur OS version.

@meeshkabob
Copy link

meeshkabob commented Feb 16, 2023

I also have this issue on macOS Ventura. It is not possible to debug iOS using Nativescript VS Code Extension.

I created a new Angular Nativescript project using the nativescript command ns create, and then generated a new nativescript launch.json file in VS Code. Whether I attempt to attach the debugger to the already running app on my iOS simulator, or attempt to launch on iOS, the debugger does not attach.

Environment:

Nativescript VS Code Extension v0.12.3
macOS 13.1 (22C65)
Nativescript 8.4.0
VS Code 1.75.1 

The console logging:

[NSDebugAdapter] Ready to attach to application on 41000

[NSDebugAdapter] Using tns CLI on path 'tns'

[NSDebugAdapter] Running tns command...

[NativeScriptCli] execute: tns --analyticsClient VSCode debug ios --start 
[NSDebugAdapter] Watching the tns CLI output to receive a connection token

Searching for devices...


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


Opened localhost 41000

�[32mTo start debugging, open the following URL in Chrome:
devtools://devtools/bundled/inspector.html?ws=localhost:41000
�[39m

[NSDebugAdapter] Ready to attach to application on 41000

Contents of launch.json:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Launch on iOS",
            "type": "nativescript",
            "request": "launch",
            "platform": "ios",
            "appRoot": "${workspaceRoot}",
            "sourceMaps": true,
            "watch": true
        },
        {
            "name": "Test on iOS",
            "type": "nativescript",
            "request": "launch",
            "platform": "ios",
            "appRoot": "${workspaceRoot}",
            "sourceMaps": true,
            "watch": false,
            "stopOnEntry": true,
            "launchTests": true,
            "tnsArgs": [
                "--justlaunch"
            ]
        },
        {
            "name": "Attach on iOS",
            "type": "nativescript",
            "request": "attach",
            "platform": "ios",
            "appRoot": "${workspaceRoot}",
            "sourceMaps": true,
            "watch": false
        },
        {
            "name": "Launch on Android",
            "type": "nativescript",
            "request": "launch",
            "platform": "android",
            "appRoot": "${workspaceRoot}",
            "sourceMaps": true,
            "watch": true
        },
        {
            "name": "Test on Android",
            "type": "nativescript",
            "request": "launch",
            "platform": "android",
            "appRoot": "${workspaceRoot}",
            "sourceMaps": true,
            "watch": false,
            "stopOnEntry": true,
            "launchTests": true,
            "tnsArgs": [
                "--justlaunch"
            ]
        },
        {
            "name": "Attach on Android",
            "type": "nativescript",
            "request": "attach",
            "platform": "android",
            "appRoot": "${workspaceRoot}",
            "sourceMaps": true,
            "watch": false
        }
    ]
}

@cbtham
Copy link

cbtham commented Apr 15, 2023

Same problem as well. MacOS ventura debugging in vscode doesnt work at all

@meeshkabob
Copy link

VSCode debugging for iOS is still not functional in my environment. Both Launch on iOS and Attach on iOS conclude with output, [NSDebugAdapter] Ready to attach to application on 41000.

Any advice or suggestions would be appreciated.

Environment:

Nativescript VS Code Extension v0.12.3
macOS Ventura 13.5.1
Nativescript 8.5.3
VS Code 1.81.1
Simulator: iPhone 14 Pro Max, iOS 16.4

@valera1401
Copy link
Author

VSCode debugging for iOS is still not functional in my environment. Both Launch on iOS and Attach on iOS conclude with output, [NSDebugAdapter] Ready to attach to application on 41000.

Any advice or suggestions would be appreciated.

Environment:

Nativescript VS Code Extension v0.12.3
macOS Ventura 13.5.1
Nativescript 8.5.3
VS Code 1.81.1
Simulator: iPhone 14 Pro Max, iOS 16.4

Open in browse debug link from console.
Click "Reconnect" button about ten times.
VS Code debug should work after that.

@vallemar
Copy link
Contributor

Same here, not working

@vallemar
Copy link
Contributor

Fixed in v0.12.4 #297

@meeshkabob
Copy link

It works! Thank you, major quality of life improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants