This works for me:
"file_regex": ".*file:\/\/\/(.*):([0-9]*):[0-9]*",
Note that:
- this uses a file_regex instead of line_regex
- I am using Sublime Text 2
- I am running dart.exe on Windows
I am running a simple dart command line program and get output like this:
Hello world
Unhandled exception:
exception
#0 main (file:///C:/src_test/dart/dart_test.dart:4:3)
Here is my test program:
void main() {
print("Hello world\n");
throw 'exception';
}
edit:
for mac, it should be:
"file_regex": ".*file:\/\/(.*):([0-9]*):[0-9]*",
Notice there are only two \/
s after file:
, or sublime will try to find a file with wrong path, e.g.
~/dev/dart/myproject/Users/home/freewind/dev/dart/myproject/test.dart
If I use two \/
, it will be correct:
/Users/home/freewind/dev/dart/myproject/test.dart