Sublime Forum

Build system - capture errors

#1

Hello, I’m having difficulties capturing errors when I build. My build system is specified inside project file.

{
“name”: “Build name”,
“shell_cmd”: “build.bat”,
“file_regex”: “^(…^:]):([0-9]+):?([0-9]+)?:? (.)$”
}

As I undertand from the documentation, file_regex should be used to capture errors and enable navigation between them using F4. But I can’t get that to work. The build errors are shown in the build window, but always in the same syntax and F4 doesn’t work. I’ve tried many examples from the web for file_regex, but none seems to work. If I delete that line completely, it doesn’t have any effect. It’s like Sublime isn’t even reading it. Am I missing something obvious? build.bat is just a batch script that runs cl.exe with some arguments.

I’m using latest Sublime 3103 on Windows 8.

Thanks,
Vjekoslav

0 Likes

#2

you could try executing sublime.log_result_regex(True) in the console, then running your build system and checking the console for results of the regex

0 Likes

#3

This makes no sense and will never match.

Experiment with your regular expression on http://www.regexr.com/.

0 Likes