-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Unable to debug on physical device #41
Comments
Hi! Actually debugging currently doesn't work on physical devices. You can only launch app on physical devices. To fix error that you've mentioned please update the extension to the latest version and try to launch using |
Thank you very much, I can run it on a physical device. I would be extremely grateful if you could explain the challenges of debugging on a physical device. I'd like to try implementing this feature and hope to be of some help. |
That would be amazing @wr-fenglei! I was trying to run it on the device today, and having debug support would be wonderful! |
In the latest version (0.1.34), I've added the --console option for launching on physical devices. This option will redirect stdout to the extension, allowing you to print debug information on a physical device.
Thank you! That would be amazing! 💜 I think a good starting point for configuring proper debugging with LLDB is to check this comment in the Flutter project: flutter/flutter#133465 (comment). From my understanding, launching an LLDB session with
In my extension, I heavily rely on the CodeLLDB extension for LLDB debugging and my extension just provide the correct options to this extension based on project information. Most of the logic is located in the If you have any other questions or ideas, don't hesitate to contact me |
I'm able to debug app using folowing patch and vscode-ios-debug extension (patched for Xcode 16): #76 |
@kvaster This is great! I'll upgrade to Xcode 16 soon and give it a try. |
@kvaster i've tried but still not working, with a toast |
@bingli-minimax Try replacing with your app's actual Bundle ID, for example: com.example.myapp |
Actually, i have set my own app Bundle ID and still not working. The Bundle Id in post above is for example because i do not want to show the app info. |
How it works at my place. You need to install latest sweetpad and vscode-ios-debug. If you're using iOS >= 17 (Xcode >= 16) then you need to install patched version of vscode-ios-debug. Patch is here: nisargjhaveri/vscode-ios-debug#25 Open your project, choose proper schema and configuration and press build and run in sweetpad pane. Make sure you device is unlocked in that moment. After app will be launched and you'll be able to see app's logs, start debugging from Run and Debug pane. Please make sure your app is running and device is unlocked in that moment. This is how it works at my place. And I'm using Xcode 16.1, tested also on Xcode 16. And I've not tested it without patch and on Xcode < 16 (iOS < 17). |
Thank you very much for creating this plugin. I really like it.
However, I've found that I can't debug on a physical device. Is there something wrong with my configuration?
My plugin version is 0.1.33.
I'm using Xcode 15.2, and my phone's system is iOS 17.6.1.
My launch.json configuration is as follows:
When I use VSCode's debug feature, the Terminal outputs:
When I use the command: SweetPad: Build & Run (Launch), the Terminal outputs:
When using VSCode's debug feature, the --device parameter is: iosdevice-00008020-000B34D6012A003F (may be wrong)
When using SweetPad's debug feature, the --device parameter is: 00008020-000B34D6012A003F
Additionally, when I use SweetPad: Get app path for debugging, it pops up an error:
I've noticed that when running on a physical device,
build.lastLaunchedAppPath
is not updated. I'm not sure if this is related.I would greatly appreciate if you could look into this issue. I'm really looking forward to debugging on a physical device.
The text was updated successfully, but these errors were encountered: