The program returns 0 to indicate Success, or a certain number indicates failure. If it fails, Visual Studio will correctly output: “Command […] to exit with code n.”
However, a single number is not always useful. In my case Next, I actually want the error to point to a specific location in the source code. Is it possible to output the file name and line number so that Visual Studio actually lets me just double-click the error and get there immediately?
D:\dev\project\Code\MyClasscpp(68): something terrible happened
Then You can double-click the line and the editor will open on the specified line.
Greetings,
Sebastiaan
I just I wrote a small program, when I compile some projects, it will be executed as a post-build step.
The program returns 0 to indicate success, or a certain number to indicate failure. If it fails, Visual Studio will correctly output: “The command […] exits with code n.”
However, a single number is not always useful. In my case, I actually want the error to point to a specific source code Location. Is it possible to output the file name and line number so that Visual Studio actually lets me just double-click on the error and get there immediately?
If the program you are running is a console application, I think its output will be displayed in the output pane. If the output is a table
< /p>
D:\dev\project\Code\MyClasscpp(68): something terrible happened
Then you can double-click the line, the editor will be in the specified Open on the line.
Greetings,
Sebastiaan