text
stringlengths
1
372
or running application, assuming that you are running
your app in debug mode:
to assign an evaluated object to a variable,
use $0, $1 (through $5) in the form of var x = $0:
<topic_end>
<topic_start>
browse heap snapshot
to drop a variable to the console from a heap snapshot,
do the following:
the console screen displays both live and static
inbound and outbound references, as well as field values:
<topic_end>
<topic_start>
using the network view
info note
the network view works with all flutter and dart applications.
<topic_end>
<topic_start>
what is it?
the network view allows you to inspect HTTP, HTTPS, and web socket traffic from
your dart or flutter application.
<topic_end>
<topic_start>
how to use it
network traffic should be recording by default when you open the network page.
if it is not, click the resume button in the upper left to
begin polling.
select a network request from the table (left) to view details (right). you can
inspect general and timing information about the request, as well as the content
of response and request headers and bodies.
<topic_end>
<topic_start>
search and filtering
you can use the search and filter controls to find a specific request or filter
requests out of the request table.
to apply a filter, press the filter button (right of the search bar). you will
see a filter dialog pop up:
the filter query syntax is described in the dialog. you can filter network
requests by the following keys:
any text that is not paired with an available filter key will be queried against
all categories (method, uri, status, type).
example filter queries:
<topic_end>
<topic_start>
other resources
HTTP and HTTPs requests are also surfaced in the timeline as
asynchronous timeline events. viewing network activity in the timeline can be
useful if you want to see how HTTP traffic aligns with other events happening
in your app or in the flutter framework.
to learn how to monitor an app’s network traffic and inspect
different types of requests using the DevTools,
check out a guided network view tutorial.
the tutorial also uses the view to identify network activity that
causes poor app performance.
<topic_end>
<topic_start>
using the debugger
info note
DevTools hides the debugger tab if the app was launched
from VS code because VS code has a built-in debugger.
<topic_end>
<topic_start>
getting started
DevTools includes a full source-level debugger, supporting
breakpoints, stepping, and variable inspection.
info note
the debugger works with all flutter and dart applications.
if you are looking for a way to use GDB to remotely debug the
flutter engine running within an android app process,
check out flutter_gdb.
when you open the debugger tab, you should see the source for the main
entry-point for your app loaded in the debugger.
in order to browse around more of your application sources, click libraries
(top right) or press ctrl / cmd + p.
this opens the libraries window and allows you
to search for other source files.
<topic_end>
<topic_start>
setting breakpoints
to set a breakpoint, click the left margin (the line number ruler)
in the source area. clicking once sets a breakpoint, which should
also show up in the breakpoints area on the left. clicking
again removes the breakpoint.
<topic_end>
<topic_start>
the call stack and variable areas
when your application encounters a breakpoint, it pauses there,
and the DevTools debugger shows the paused execution location
in the source area. in addition, the call stack and variables
areas populate with the current call stack for the paused isolate,
and the local variables for the selected frame. selecting other
frames in the call stack area changes the contents of the variables.
within the variables area, you can inspect individual objects by
toggling them open to see their fields. hovering over an object
in the variables area calls toString() for that object and
displays the result.
<topic_end>
<topic_start>
stepping through source code
when paused, the three stepping buttons become active.