text stringlengths 1 372 |
|---|
io.flutter plugins. |
double click GeneratedProjectRegistrant to open the |
java code in the edit pane. |
at the end of this procedure, both the dart and android debuggers interact |
with the same process. |
use either, or both, to set breakpoints, examine stack, resume execution |
and the like. in other words, debug! |
<topic_end> |
<topic_start> |
debug dart and iOS code using xcode |
to debug iOS code, you need a flutter app that contains iOS code. |
in this section, you learn to connect two debuggers to your app: |
flutter via VS code and xcode. you need to run both VS code and xcode. |
these section uses the same example flutter url_launcher app created |
in update test flutter app. |
<topic_end> |
<topic_start> |
build the iOS version of the flutter app in the terminal |
to generate the needed iOS platform dependencies, |
run the flutter build command. |
<topic_end> |
<topic_start> |
start debugging with VS code first |
if you use VS code to debug most of your code, start with this section. |
<topic_end> |
<topic_start> |
start the dart debugger in VS code |
to open the flutter app directory, go to |
file > |
open folder… and choose the my_app directory. |
open the lib/main.dart file. |
if you can build an app for more than one device, |
you must select the device first. |
go to |
view > |
command palette… |
you can also press ctrl / cmd + |
shift + p. |
type flutter select. |
click the flutter: select device command. |
choose your target device. |
click the debug icon |
(). |
this opens the debug pane and launches the app. |
wait for the app to launch on the device and for the debug pane to |
indicate connected. |
the debugger takes longer to launch the first time. |
subsequent launches start faster. |
this flutter app contains two buttons: |
<topic_end> |
<topic_start> |
attach to the flutter process in xcode |
to attach to the flutter app, go to |
debug > |
attach to process > |
runner. |
runner should be at the top of the attach to process menu |
under the likely targets heading. |
<topic_end> |
<topic_start> |
start debugging with xcode first |
if you use xcode to debug most of your code, start with this section. |
<topic_end> |
<topic_start> |
start the xcode debugger |
open ios/Runner.xcworkspace from your flutter app directory. |
select the correct device using the scheme menu in the toolbar. |
if you have no preference, choose iPhone pro 14. |
run this runner as a normal app in xcode. |
when the run completes, the debug area at the bottom of xcode displays |
a message with the dart VM service URI. it resembles the following response: |
copy the dart VM service URI. |
<topic_end> |
<topic_start> |
attach to the dart VM in VS code |
to open the command palette, go to |
view > |
command palette… |
you can also press cmd + shift + p. |
type debug. |
click the debug: attach to flutter on device command. |
in the paste an VM service URI box, paste the URI you copied |
from xcode and press enter. |
<topic_end> |
<topic_start> |
debug dart and macOS code using xcode |
to debug macOS code, you need a flutter app that contains macOS code. |
in this section, you learn to connect two debuggers to your app: |
flutter via VS code and xcode. you need to run both VS code and xcode. |
these section uses the same example flutter url_launcher app created |
in update test flutter app. |
<topic_end> |
<topic_start> |
build the macOS version of the flutter app in the terminal |
to generate the needed macOS platform dependencies, |
run the flutter build command. |
<topic_end> |
<topic_start> |
start debugging with VS code first |
<topic_end> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.