Support for debugging add-to-app flutter app
See original GitHub issueI’ve switched my app to be the add-to-app setup in order to better support app extensions on the iOS platform. While this is working great, and it’s nice to have full control over the Xcode Project generation, the drawback is that I can no longer start/debug the app from VS Code.
Would it be possible to add a new debug configuration for starting a custom app and connecting to that one?
I imagine it would look something like this:
{
"name": "Flutter",
"request": "launch-custom",
"type": "dart",
"xcworkspace": "ios/MyApp.xcworkspace",
"xcscheme": "MyApp"
}
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:12 (5 by maintainers)
Top Results From Across the Web
Debugging your add-to-app module - Flutter documentation
How to run, debug, and hot reload your add-to-app Flutter module.
Read more >How to run flutter release on Android debug buildtype for add ...
Our Android app uses flutter as add to app. How can I run release version of flutter when running our Android app debug...
Read more >Flutter Add to App - Overview and Challenges by LeanCode
In that case, a Flutter add-to-app will help you add new features to ... The debugger wouldn't attach to some engines, and the...
Read more >Announcing Flutter 1.12: What a year! | by Chris Sells - Medium
With Flutter 1.12, Add-to-App is now officially supported for adding one ... When you've built and debugged your Flutter UI, you have most ......
Read more >How to Add Flutter to an Existing iOS and Android App
The add-to-app the feature supports integrating multiple ... Support for Flutter debugging and stateful hot reload by using flutter attach ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sort-of 😃
The problem here is that because you’re attaching (and not launching), we don’t know what part of your workspace is the project. I think if you create a
launch.json
and set thecwd
to point at theflutter
folder, probably that will fix it (since then we’d spot that it contained apubspec
that references the Flutter SDK).To avoid confusion, if that doesn’t work - open a new issue with the details, and include a log (run
Dart: Capture Logs
, then run the attach command, then when it asks for Observatory URI, cancel it and click Stop Logging).The other issue does look like a Flutter bug. I think the method for finding the Observatory URI is being changed to use mDNS (which should mean doing things in a specific order will not be required), but seems there’s something wrong with it. If you’re on
master
, you might be able to avoid it by switching to something likebeta
temporarily.I don’t think there’s anything else for this issue so I’ll close it but feel free to post back on it if you have any questions about the above (for ex. if you can’t get the tasks/launch.json stuff working) and I’ll try to help out.
Thanks!
You shouldn’t have needed to restart VS Code, though glad it’s working now 😃