Open UnrealHeaderTool project, In the function “FBaseParser::GetChar”, add a breakpoint with condition “InputPos>InputLen+1”.Then start debugging UnrealHeaderTool with arguments copyed from the game project.
Wait until the breadpoint is triggered:
At this moment, UBT starts to parse the part of “FBaseParser::Input” which is not belonged to the header file.Then any unexpected compilation error maybe happened in other header files!!!
When I added a macro to the end of a header file as you showed, the last \ character seemed to consume the end of file character. However, that only happened if I did not add some extra blank lines between the macro and the end of the file. If you do not include the last \ character, do you still run into this issue?
I was not able to get the conditional breakpoint that you mentioned setting to get hit. Could you clarify what arguments you are using when you start debugging UHT?