Is there a way to get msvc to generate a compile_commands.json file when it’s using its llvm compiler? (a normal msvc project with .sln, no cmake stuff is used)
You can add it as a Makefile target and then have that target run with every build. Using the compiledb tool is fast and doesn’t require a clean re-build. Here’s how I do it (the second version is better):