Mick
Mick

Reputation: 7927

Can visual studio report which file its compiling now?

Sometimes I have errors which are caused by a particular cascading sequence of #include's... it would be much easier to debug if visual studio could give a kind of running commentary on which file it was currently processing. Can it be persuaded to do so?

Upvotes: 1

Views: 58

Answers (2)

quamrana
quamrana

Reputation: 39354

You can do this manually. Insert:

#pragma message(" put name of file here ")

at the top of every header file.

Not as good as nobugz suggestion, but good to remember as a quick and dirty way of seeing if one or two headers files are being included at all.

Upvotes: 0

Hans Passant
Hans Passant

Reputation: 941277

It already outputs the source code file name in the Output window. If you also want to see which #include file it is processing then use Project + Properties, C/C++, Advanced, Show Includes = Yes.

Upvotes: 2

Related Questions