Break on error

Theres a suggested mechanism to break execution, and show details when an error raises on a train script?

Best regards

Train doesn’t have a debugger I’m afraid, no :frowning:

I mean errors at running time, more precise the output for MSBUILD function. Theres any way to avoid the command windows to close and stay there showing the error? Thats all I need because the script is tested, the only variable (I hope) is msbuild process.

Thanks Marc!
Best regards.

Oh. no that’s just how Windows cmd windows work :(. if you wanna see the output you need to run train from a cmd window you opened yourself, or from a batch file that, say, does a “pause” afterwards.

Also, run with --live for more derails, or with -t log.html to get a log file.

Seems like im not explaining this very well. :slight_smile:

I understand how windows cmd works.

I can do a pause if evaluating msbuild output function result. In fact I already do if all goes ok.

shell.system("pause");

but I dont know, and afaik is not documented, if train msbuild function return some code indicating successfull or fail run.

http://remobjects.github.io/train/API/MSBuild/index.html

if theres some code , that is all I need.

best regards.

Maybe not, because now I’m completely lost as to what you want to achieve, sorry :frowning:

msbuild returns an error code if build fails? that must be my original question. :grimacing:

the msbuild action would then also fail and abort the script, yeah…?

I see. I believe train environment protect that calls. My bad.

Best regards.

1 Like