I am experimenting with Dart and libraries and I cannot seem to get a breakpoint to work in my library class.
I've created a library in lib/myLib/myLib.dart
, defined a class there and set a breakpoint in the constructor. I construct this class from my main method, defined in web/test.dart
. Breakpoints which are set in the main method are hit, but the breakpoints from the library are not hit. I am certain the code executes though, as i can step into the library's code from the main method.
Is this a known issue, or do i need to configure something? I am using Dart Editor version 1.0.0_r30798 and DartSDK version 1.0.0.10_r30798 on Windows 7 64-bit.
You are probably importing your own library like this:
import “package:mylib/lib.dart”;
If so, you should put your breakpoint in the files located under the “packages” folder in your project.
Alternatively, you can import your lib with a relative path:
import “../lib/lib.dart”;