If the DBGp client has redirected stderr (as I assume is the case here), AutoHotkey outputs the exact text that would be shown in an error dialog, or is shown in the error dialog. It is designed to be displayed in the error dialog, not for consumption by the debugger. If the error occurs in an #include file, the text begins with Error in #include file "path-of-file":
. It is assumed that the full path of the main script file would be unnecessary noise, so in that case the text begins with Error:
. If you receive an error message in the latter form, you can assume it comes from the main script file.
In either case, no line number is given. I believe this feature was added by fincs via the merge with AutoHotkeyU (Unicode support); I did not originally intend to add it, and do not make use of it. Perhaps I would if the format was changed to be the same as #ErrorStdOut, which several editors (including Visual Studio and SciTE) understand and can jump to.
I've long planned to make use of DBGp's "exception breakpoints" to allow breaking into the debugger when a runtime error occurs, but haven't got around to it. In that case, the debugger can get the entire call stack instead of just the file/line at the top. Technically, it's already possible if the client sends commands while the error dialog is showing. (The client can make use of async support, or can be attached to the script after the error dialog appears by posting AHK_ATTACH_DEBUGGER