Can one capture the command line commands executed in a build?

For example, I have a build step the executes a "Command Line" runner type.  Per the build log, the script is executed from a .cmd file on the build server, but this file goes away as soon as the build finishes.  My problem is that some of these commands are failing for me on the build server, but not locally.  But given the dynamic-created nature of the commands (using Build Properties), it time-consuming to figure out what, exactly, was being executed.  Not to mention reconstructing manaully is prone to human error.

Is there a way to capture the contents of the .cmd file and see them somewhere? In a detailed log? Or a way to keep them around after the build finishes?

2 comments
Comment actions Permalink

Hi

Command-line build runner can launch exe-files directly, or allows to specify commands in Web UI.
Capture.PNG
In later case the commands are copied to this dynamic cmd-file.

Please try to login to your build server interactivelly, using the same account as a build agent, and reproduce the issue from there.

0
Comment actions Permalink

Hi Michael.  I am executing the runners fine, what I am trying to figure out is how to capture the actual scripts being executed, since they are dependent on a great number of build-properties.e.g. My script might look something like:

    %env.VisualStudio2010%\Common7\IDE\devenv.com %build.file.directory%\%build.file.projectName% /Build "%build.configuration%|x86"

What I'd like to capture is what this command looks like *after* the build properties have been applied.  Obviously this can be done manually, but for more extensive scripts this becomes cumbersome and susceptible to human error, which makes tracking down scripting problems even more difficult.

0

Please sign in to leave a comment.