# trace & debug when cmake use with CMakePresets.json

**URL:** https://discourse.cmake.org/t/trace-debug-when-cmake-use-with-cmakepresets-json/7262
**Category:** Usage
**Created:** [January 17, 2023, 7:50am UTC](https://discourse.cmake.org/t/trace-debug-when-cmake-use-with-cmakepresets-json/7262 "2023-01-17T07:50:16Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Maziar](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/m/ac8455/32.png) [@Maziar](https://discourse.cmake.org/u/Maziar)
#### Post date: [January 17, 2023, 7:50am UTC](https://discourse.cmake.org/t/trace-debug-when-cmake-use-with-cmakepresets-json/7262/1 "2023-01-17T07:50:16Z")

</div>

Hi

I have problem for tracing & find bug in CMakePresets.json

Try debugging CMake with CMake --debug-output or --trace also not any help. CMake have CMakePresets.json.

For example, my situation CMAKE\_EXPORT\_COMPILE\_COMMANDS set outside “cacheVariables”

Get error :  
CMake Error: Could not read presets from zzz Invalid preset

How find bug in CMakePresets.json when trace & debug out NOT work ?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [January 17, 2023, 4:54pm UTC](https://discourse.cmake.org/t/trace-debug-when-cmake-use-with-cmakepresets-json/7262/2 "2023-01-17T16:54:13Z")

</div>

@kyle.edwards
