Redirecting errors is one good solution, yeah. Programs have standard output and a separate error stream.
Alternatively, you should be able to right-click the batch file, properties (Eigenschaften), then find a checkbox to keep the console open after the program has finished running.
Another alternative is to add "pause" without quotes to the end of the batch file. For a debugging build:
dub build
pause
For a release build that runs faster, but doesn't produce nice error messages when something fails during runtime:
dub build -b release
pause
-- Simon