如何在Observatory的调试器控制台中调试变量?

时间:2017-11-15 05:21:22

标签: debugging flutter

在我的代码中放入debugger;语句并在Observatory vm中打开isolate时,我可以看到代码在断点框架处停止,框架旁边显示的变量以及shell执行命令行。

我想玩变量,看看对象持有什么方法,在编写代码之前在天文台中测试操作,但变量在命令行中不可用。

这是帮助文本:

$ 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

看起来无法进入该功能并执行dart命令。我错过了什么 ?我将如何调查对象及其方法?

在此示例中,我想调查FirebaseDatabase中的DatabaseReference对象reference,以了解如何删除现有条目。不知道如何在没有解释器的情况下完成这项工作。

也许我很惊讶来自Python,哪个调试器包含一个解释器?但是使用像DartPad这样的工具或像dart-console

这样的项目,这在Dart中听起来不可能。

0 个答案:

没有答案