Breakpoints in Dartium not working

牧云@^-^@ 提交于 2019-11-26 12:48:32

问题


So if I add break points in .dart files that are located in /web directory of my project, it works fine. For example I\'m using AngularDart and the main.dart file works. However when I try to put a breakpoint in anything in the /lib directory, Dartium doesn\'t stop on them.

How can I get the breakpoints in Dartium to work with the /lib directory?

Note that I\'ve tried putting breakpoints with Dart Editor, IntelliJ with Dart Plugin and also directly in Dartium and nothing works. Is this intended?


回答1:


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.

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




回答2:


I will combine the accepted answer + comment to that answer. Breakpoints 100% works only when you set them for files inside (no domain) category on Sources tab.

As I understand, in category with your domain name they are working only for files that was included with <script> tag. They won't work for imported files.

I have created an issue: Dartium ignores breakpoints set not in (no domain) category.




回答3:


If you set break pointors from Dart Editor, then you should run your application from Dart Editor.

If you're using Dartium only, then you should set break pointors from Chrome Developer Tool. (Accepted answer)



来源:https://stackoverflow.com/questions/26822902/breakpoints-in-dartium-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!