[cmake-developers] Debugger for CMake

Justin Berger j.david.berger at gmail.com
Tue Jan 31 14:55:45 EST 2017


> I liked the snapshots that were in Stephen Kelly's daemon-mode patch much
better than an interactive debugger.

I'm not sure these tools have that much use-case overlap. As far as I can
tell, snapshots has roughly the same overhead / functionality as reversible
interactive debuggers; which is non trivial. Which tool is best for a given
problem seems situational; and having both seems useful.

I looked through the code for cmServer, since it maintains an instance of
cmake in process, it could register as a debug listener and get events /
set breakpoints and all in response to different requests coming in. The
issue here though is that it seems like (and maybe this is wrong?) the
actual call out to configure blocks on the libuv loop thread so it can't
get or process any requests while configure is running; so maybe keeping
them as seperate services running on separate loops is better.

The only way I could see it making sense to use a completely different
protocol would be if there were a semi-standard debugger protocol used in
different IDE's for debugging interpreted code, and then I think it makes
sense to pursue those. However, I did some research into that and didn't
find anything especially relevant -- IDE maintainers would obviously have a
better sense of that though. Also, even if there is such a thing, there is
no reason not to support multiple debug protocols; it is just a matter of
prioritization.

It seems like QtCreator is the only IDE which currently has current support
for server-mode; are there any Qt people active on the mailing list who
could weigh in on what approach makes the most sense from an integrators
perspective?

On Tue, Jan 31, 2017 at 12:26 AM, Tobias Hunger <tobias.hunger at gmail.com>
wrote:

> On Jan 30, 2017 20:03, "Sylvain Joubert" <joubert.sy at gmail.com> wrote:
>
> > c) What is the best
>
>> approach to make this kind of feature appealing to IDE / UI tools which
>> currently work with CMake?
>>
>>
> If I recall correctly, one of the initial use cases for the server mode
> was exactly that. The very first prototype of Stephen Kelly had this
> feature and could trace were a variable was last modified, make a diff of
> the CMake state between two locations in a CMake script,...
>
>
> I liked the snapshots that were in Stephen Kelly's daemon-mode patch much
> better than an interactive debugger.
>
> Those much easier to use and visualize for an IDE than having an
> interactive debugger. And they make much more sense IMHO: You can see state
> and how that changes in every line instead of just the current one.
>
> I didn't look at your code and I'll let the server mode maintainers give
> their feedback too but I guess the best way to go would be to jump in
> server mode to add that. Besides, the server mode is especially designed to
> be IDE friendly.
>
>
> I want to add support for snapshots as soon as they are available in cmake.
>
> Is somebody working on the snapshot infrastructure? That is way too deep
> in core cmake components for me to feel comfortable to implement. I will of
> course happily write the code to integrate that into server mode:-)
>
> Best Regards,
> Tobias
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20170131/da668758/attachment.html>


More information about the cmake-developers mailing list