# Using --trace or --debug with the -E option (from a newbie)

**URL:** https://discourse.cmake.org/t/using-trace-or-debug-with-the-e-option-from-a-newbie/15211
**Category:** Usage
**Created:** [October 2, 2025, 12:52pm UTC](https://discourse.cmake.org/t/using-trace-or-debug-with-the-e-option-from-a-newbie/15211 "2025-10-02T12:52:02Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![AlbertM](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/a/71e660/32.png) [@AlbertM](https://discourse.cmake.org/u/AlbertM)
#### Post date: [October 2, 2025, 12:52pm UTC](https://discourse.cmake.org/t/using-trace-or-debug-with-the-e-option-from-a-newbie/15211/1 "2025-10-02T12:52:02Z")

</div>

Hi,

Specifying -trace or –debug before the -E option messes up the -E option. I can’t find this documented in the options page ([https://cmake.org/cmake/help/v4.0/manual/cmake.1.html#run-a-command-line-tool](https://cmake.org/cmake/help/v4.0/manual/cmake.1.html#run-a-command-line-tool))

This might be a bug but it might at least be nice to indicate in the documentation or maybe even cmake could flag this.

This was particularly confusing when I was trying to debug something that I was only trying to build which used cmake. I am brand new to cmake and I figured I’d add –debug to a command that was failing. My command was something like:

> cmake -trace -E “abc.exe” -o xyz.txt

cmake complained:

> CMake Error: Unknown argument -o

Thanks,  
Albert

---

<div class="post-metadata">

### Author: ![jtxa](https://discourse.cmake.org/user_avatar/discourse.cmake.org/jtxa/32/1535_2.png) [@jtxa](https://discourse.cmake.org/u/jtxa)
#### Post date: [October 2, 2025, 10:59pm UTC](https://discourse.cmake.org/t/using-trace-or-debug-with-the-e-option-from-a-newbie/15211/2 "2025-10-02T22:59:41Z")

</div>

The synopsis show which command line flag results into which action.

Each action is described in its own chapter with all details.

The options of “Generate a Project Buildsystem” cannot be applied to the other actions, like “Run a Command-Line Tool“, they are not mentioned there.
