So I am trying to get the ‘compile_commands.json’ file so I can use it inside of Sourcetrail.
I do understand that I have to specify the tool mode ‘GenerateClangDatabase’ but I don’t know how/where.
Am I supposed to add an argument to the build task in the ‘tasks.json’ file?
I found that in this answer that led me to it:
Additional: I am using VSCode on Windows 10
(sorry for necroying this thread)
Using VSCode on Windows does not require compile_commands.json.
This file is only required when using clangd or other similar language server.
Instead, you can use Microsoft’s vscode-cpptools plugin which uses IntelliSense.
This is Epic’s recommended way of using VSCode and here’s the doc on how to do this:
Just small note: this does not seem to work on Linux, at least not on every distro, and you need proprietary version of VSCode (not VSCodium or other similar libree equivalent). I got this working on Arch with addition of following plugin: UE Intellisense Fixes - Visual Studio Marketplace
Not sure how about MacOSX though