简体   繁体   English

Dart 的基于 Web 的调试器是否有 API?

[英]Is there an API for Dart's web-based debugger?

I'm new to Dart.我是 Dart 的新手。 I have been playing around with the browser-based debugger with a simple command-line app like so:我一直在玩基于浏览器的调试器和一个简单的命令行应用程序,如下所示:

flutter pub global run devtools 
dart --observe test_file.dart --pause-isolates-on-start 

I navigate to 127.0.0.1:9100 , enter the URL provide by the dart tool and everything works.我导航到127.0.0.1:9100 ,输入dart工具提供的 URL,一切正常。

Is there any official documentation for how the browser is able to command the VM to step through code, set breakpoints, etc?是否有关于浏览器如何命令 VM 单步执行代码、设置断点等的官方文档? I cannot find any.我找不到任何。

I would like to integrate Dart debugging support into an editor I'm writing and I'm guessing that since the browser can manipulate the VM there must be some sort of API in existence.我想将 Dart 调试支持集成到我正在编写的编辑器中,我猜因为浏览器可以操作 VM,所以一定存在某种 API。 Is this public or private?这是公共的还是私人的?

I believe you are looking for the Dart Debugger API, which is already being used by most of the debuggers that understand Dart/Flutter.我相信您正在寻找 Dart Debugger API,大多数了解 Dart/Flutter 的调试器已经在使用它。 Docs for that may be found at [the debugger api docs][1] https://pub.dev/documentation/chrome_dev_tools/latest/domains_debugger/DebuggerApi-class.html相关文档可在 [调试器 API 文档][1] https://pub.dev/documentation/chrome_dev_tools/latest/domains_debugger/DebuggerApi-class.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM