3

因此,如果我在位于项目的 /web 目录中的 .dart 文件中添加断点,它就可以正常工作。例如,我正在使用 AngularDart 并且 main.dart 文件有效。但是,当我尝试在 /lib 目录中的任何内容中放置断点时,Dartium 不会停止它们。

如何让 Dartium 中的断点与 /lib 目录一起使用?

请注意,我已经尝试使用 Dart Editor、IntelliJ 和 Dart Plugin 以及直接在 Dartium 中放置断点,但没有任何效果。这是故意的吗?

4

3 回答 3

6

To set breakpoints in dependencies search the source inside the (no domain) node and set the breakpoint there. Breakpoints don't hit when set somewhere in the packages node.

enter image description here

You can also use the breakpoint statement for the debugger top pop up. See Does Dart have a 'breakpoint' statement? for more details.

于 2014-11-08T22:43:10.260 回答
2

我将把接受的答案+评论结合到那个答案中。断点 100% 仅在您为选项卡(no domain)上的类别内的文件设置它们时才有效Sources

据我了解,在您的域名类别中,它们仅适用于<script>标签中包含的文件。它们不适用于导入的文件。

我创建了一个问题:Dartium ignores set not in (no domain) category 的断点

于 2014-11-13T21:06:33.790 回答
0

如果你从 Dart Editor 设置断点,那么你应该从 Dart Editor 运行你的应用程序。

如果你只使用 Dartium,那么你应该从Chrome Developer Tool. (接受的答案)

于 2014-11-13T21:14:41.237 回答