Debugging 如何调试观测站中的变量';调试器控制台?

Debugging 如何调试观测站中的变量';调试器控制台?,debugging,flutter,Debugging,Flutter,放置调试器时语句并在Observator vm中打开隔离,我可以看到代码在断点的帧处停止,帧旁边显示的变量,以及执行命令行的shell 我想玩变量,看看对象持有什么方法,在编写代码之前在observatory中测试操作,但是命令行中没有变量 以下是帮助文本: $ h List of commands: break - Add a breakpoint by source location or function name (hotkey: [F8]) clear

放置
调试器时语句并在Observator vm中打开隔离,我可以看到代码在断点的帧处停止,帧旁边显示的变量,以及执行命令行的shell

我想玩变量,看看对象持有什么方法,在编写代码之前在observatory中测试操作,但是命令行中没有变量

以下是帮助文本:

$ h
List of commands:

break        - Add a breakpoint by source location or function name (hotkey: [F8])
clear        - Remove a breakpoint by source location or function name (hotkey: [F8])
cls          - Clear the console
continue, c  - Resume execution of the isolate (hotkey: [F7])
delete       - Remove a breakpoint by breakpoint id
down         - Move down one or more frames (hotkey: [Page Down])
finish       - Continue running the isolate until the current function exits
frame, f     - Set the current frame
help         - List commands or provide details about a specific command
info         - Show information on a variety of topics
isolate, i   - Switch, list, rename, or reload isolates
log          - Control which log messages are displayed
next, n      - Continue running the isolate until it reaches the next source location in the current function (hotkey: [F9])
next-async   - Step over await or yield
next-sync    - Run until return/unwind to current activation.
pause        - Pause the isolate (hotkey: [Ctrl ;])
print, p     - Evaluate and print an expression in the current frame
refresh      - Refresh debugging information of various sorts
reload       - Reload the sources for the current isolate
rewind       - Rewind the stack to a previous frame
set          - Set a debugger option
step, s      - Continue running the isolate until it reaches the next source location (hotkey: [F10]
up           - Move up one or more frames (hotkey: [Page Up])
vm           - Manage a Dart virtual machine

For more information on a specific command type 'help <command>'
For a list of hotkeys type 'help hotkeys'

Command prefixes are accepted (e.g. 'h' for 'help')
Hit [TAB] to complete a command (try 'is[TAB][TAB]')
Hit [ENTER] to repeat the last command
Use up/down arrow for command history
$h
命令列表:
中断-按源位置或函数名添加断点(热键:[F8])
清除-按源位置或函数名删除断点(热键:[F8])
cls-清除控制台
继续,c-继续执行隔离(热键:[F7])
删除-按断点id删除断点
向下-向下移动一个或多个帧(热键:[向下翻页])
完成-继续运行隔离,直到当前函数退出
帧,f-设置当前帧
帮助-列出命令或提供有关特定命令的详细信息
信息-显示各种主题的信息
隔离、i-切换、列出、重命名或重新加载隔离
日志-控制显示哪些日志消息
下一步,n-继续运行隔离,直到它到达当前函数中的下一个源位置(热键:[F9])
下一个异步-跨步等待或屈服
下一次同步-运行直到返回/释放到当前激活。
暂停-暂停隔离(热键:[Ctrl;])
打印,p-计算并打印当前帧中的表达式
刷新-刷新各种调试信息
重新加载-重新加载当前隔离的源
倒带-将堆栈倒带到上一帧
set-设置调试器选项
步骤s-继续运行隔离,直到它到达下一个源位置(热键:[F10]
向上-向上移动一个或多个帧(热键:[向上翻页])
vm-管理Dart虚拟机
有关特定命令类型“帮助”的详细信息
有关热键列表,请键入“帮助热键”
接受命令前缀(例如,“h”表示“帮助”)
点击[TAB]以完成命令(请尝试“is[TAB][TAB]”)
按[ENTER]重复上一个命令
使用向上/向下箭头查看命令历史记录
似乎无法进入函数并执行dart命令。我是否遗漏了什么?我将如何调查对象及其方法

在本例中,我想研究FirebaseDatabase中的DatabaseReference对象
reference
,以了解如何删除现有条目。不知道如何在不访问解释器的情况下完成此操作


也许我对来自Python的调试程序感到惊讶,它包含了一个解释器?但这听起来在Dart中并不是不可能做到的,像DartPad这样的工具或者像

这样的项目已经知道了如何通过搜索来删除条目,但是这比从断点外壳打印变量方法要耗时得多。现在正在努力研究如何删除按对象键搜索引用的对象列表。好吧,至少这迫使我深入研究文档/代码并自己解决它,良好的学习经验。你能把你的发现写下来作为答案吗?我对此很感兴趣。我想知道如何通过搜索来删除条目,但这比打印变量要耗时得多方法。现在正在努力研究如何按对象键搜索引用的对象列表。好吧,至少这迫使我深入研究文档/代码并自己解决它,这是一个很好的学习经验。你能把你的发现写下来作为答案吗?我对此也很感兴趣