[CMake] CMake could really use a debugger...

James Bigler jamesbigler at gmail.com
Thu Apr 2 13:57:35 EDT 2009


On Thu, Apr 2, 2009 at 11:51 AM, Robert Dailey <rcdailey at gmail.com> wrote:

> That's the thing that has the "Returning to" and "Entering" messages right?
> If it is, that's somewhat helpful but not anywhere near what I'm asking
> for. Think of how visual studio debugs C++ code. That's exactly the most
> optimal debugging method I would like to see for CMake. Here's a couple of
> abilities/features I expect:
>
>    - The ability to view the values of variables dynamically. In other
>    words, as I step through code and the variable's value changes, I want to
>    see the values change in real-time, just like Visual Studio's Watch window.
>    - I want to be able to pause at each line of CMake code as it is
>    executing to evaluate the state of the application. I should be able to
>    press a key (like F10) in whatever debugger I'm using to progress to the
>    next line.
>
> I'm guessing such a thing does not exist. In addition, if CMake.exe does
> not provide a way to step through the code and view variable values
> dynamically, no such tool can be made for it. CMake has to support the
> required hooks.
>
> On Thu, Apr 2, 2009 at 11:42 AM, Bill Hoffman <bill.hoffman at kitware.com>wrote:
>
>> Robert Dailey wrote:
>>
>>> I can't tell you how hard it is to hunt down strange behavior in CMake.
>>> Often times I would save myself 30 minutes of time on each of the hard bug
>>> fixes if I could just step through each line of logic as it was being
>>> executed and view the values of variables in a "watch" window of some sort.
>>>
>>> Does anyone know if such a CMake debugger exists? If not, are there plans
>>> to make one officially by the CMake team or some third party?
>>>
>>>
>>>  Have you tried: cmake --trace
>>
>> -Bill
>>
>
What about using a debug version of CMake and firing up the VS debugger?  By
putting break points in the right places in cmake.exe you might be able to
query the state of things as CMake sees it.

It might be too extreme for what you are asking for, but you could try it in
30 minutes rather than waiting for support for this feature.

James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090402/8db6c612/attachment.htm>


More information about the CMake mailing list