How to make Visual Studio (C++) show "included by"-chain?

1283 views c++
6

When there's a build error in a header file included by a series of include files from a .cpp file, how do I make visual studio show the whole chain of include files?

For example,

fatal error C1083: Cannot open include file: 'abc.h': No such file or directory

I'd like it to also print something like

included from 'xyz.h', included from 'efg.h', included from 'main.cpp'

answered question

1 Answer

12

You can use /showIncludes option, it can be found at C/C++ -> Advanced section. It will dump a complete include tree though.

posted this

Have an answer?

JD

Please login first before posting an answer.