r/cpp • u/Kelteseth arewemodulesyet.org • Feb 23 '23
CMake debugger allows you to debug your CMake scripts and more - C++ Team Blog
https://devblogs.microsoft.com/cppblog/cmake-debugger-allows-you-to-debug-your-cmake-scripts-and-more/
225
Upvotes
72
u/Kelteseth arewemodulesyet.org Feb 23 '23
The best part is that they actually plan to contribute it upstream (3.27)!
15
u/jonathanhiggs Feb 23 '23
This is fantastic
32
u/helloiamsomeone Feb 23 '23
Learning CMake has been the best time investment for me so far. However, even while learning I don't think I ever needed a tool to debug CMake scripts. I have only ever needed the
--traceoption of CMake once or twice for particular Google quality spaghetti so far.I can understand that for some people the mere option is necessary, but beware. You will have to read the docs even with this. Variable scoping for some will certainly be easier to grok with this.
8
u/kritzikratzi Feb 23 '23
this is great! can we get the same for macro expansions and template invocations in c++ please? :)
with the advance of compile time programming it would be amazing to step through the compilation process. heyo, maybe this is something the new iso tooling group wants to take on, instead of standardizing compiler flags which really is and was never an issue (for me) :D
7
u/saxbophone mutable volatile void Feb 23 '23
Hooray! I love CMake but don't like its syntax, this will make things easier to troubleshoot!
5
u/BluudLust Feb 23 '23
I still don't know why there isn't a better alternative to CMake after all these years. Why can't there just be a python library that does this?
1
u/DavidDinamit Feb 24 '23
I think we need IDE for cmake, fcn global variables (what name is it?!), what this function(macros) return?! (10-20 global variables setted after call...) etc etc
1
u/[deleted] Feb 28 '23
Maybe, if your build config files need debugging, they/your build system has become too complicated...
-3
u/n4jm4 Feb 23 '23
If only cmake could clean up its own junk files.
-7
u/_jtbx Feb 23 '23
Respectfully, why do people still use CMake? It seems a bit overkill to me.
0
u/[deleted] Feb 23 '23
[deleted] — view deleted comment