3

I just wrote a little program which will be executed as a post-build step when I compile certain projects.

This program returns 0 for success, or some number for failure. In case of failure, Visual Studio then correctly outputs: "The command [...] exited with code n."

However, a single number is not always helpful. In my case, I actually want the error to point to a specific place in the source code. Is it possible to output a filename and line number in such a way that Visual Studio will actually let me just double-click on the error and get there instantly?

4

1 回答 1

14

If the program you're running is a console application, I think its output will appear in the output pane. If the output is of the form

D:\dev\project\Code\MyClasscpp(68) : something terrible happened

then you can double-click on the line and the editor will open on the indicated line.

于 2009-10-01T10:57:29.077 回答