<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <?xml-stylesheet href="/s/inc/rss.xsl" type="text/xsl"?>
    <rss version="2.0"  xmlns:atom="http://www.w3.org/2005/Atom">
        <channel>
            <title>RSS feed for tag debugging on Raymii.org</title> 
            <link>https://raymii.org/s/tags/debugging.xml</link> 
            <description>RSS feed for tag debugging on Raymii.org</description>
            <atom:link href="https://raymii.org/s/tags/debugging.xml" rel="self" type="application/rss+xml" />
    
            <item>
                <title>Logging all C++ destructors, poor mans run-time tracing</title> 
                <link>https://raymii.org/s/software/Logging_all_Cpp_destructors_poor_mans_run-time_tracing.html?utm_medium=rss&amp;utm_source=raymii&amp;utm_campaign=tagrss</link> 
                <guid>https://raymii.org/s/software/Logging_all_Cpp_destructors_poor_mans_run-time_tracing.html</guid>
                <description>I recently faced a challenging issue with an application that wasn't shutting down correctly, either segfaulting or terminating without an active exception. Running the program via `valgrind` to check for memory leaks wasn't possible because the program couldn’t perform its cleanup if it didn't shut down correctly. This article covers adding runtime instrumentation provided by `gcc` to log destructors. This helped me figure out what was still left over from the closed-source framework in use preventing correct shutdowns or causing segfaults. It includes example code, setup instructions and insights into handling shutdown issues in large, multi-threaded codebases.</description> 
                <pubDate>Sat, 21 Sep 2024 23:59:00 GMT</pubDate>
                <lastBuildDate>Sat, 21 Sep 2024 23:59:00 GMT</lastBuildDate>
            </item>
    
            <item>
                <title>Drawing a Circle in Qt QML three different ways</title> 
                <link>https://raymii.org/s/articles/Drawing_a_Circle_in_Qt_QML_three_different_ways.html?utm_medium=rss&amp;utm_source=raymii&amp;utm_campaign=tagrss</link> 
                <guid>https://raymii.org/s/articles/Drawing_a_Circle_in_Qt_QML_three_different_ways.html</guid>
                <description>Qt has no `Circle` built in to QML as a basic type, as for example the `Rectangle` or the `Button` control. This post shows you how to get a `Circle` in QML, from the most basic method (a `Rectangle` with a `radius` of 180) to more advanced methods, using the `Canvas` JavaScript API (which allows us to draw a partially filled Circle, for a Pie Chart) and a `c++` control based on `QQuickPaintedItem`. I wanted to experiment with the `Canvas` QML control and the `QQuickPaintedItem` C++ interface to get a better understanding of Qt and QML drawing interfaces, this post reflects that journey including showing your grouped QML properties exposed from C++.</description> 
                <pubDate>Wed, 05 Jul 2023 23:59:00 GMT</pubDate>
                <lastBuildDate>Wed, 05 Jul 2023 23:59:00 GMT</lastBuildDate>
            </item>
    
            <item>
                <title>Log all Item properties and functions in Qml</title> 
                <link>https://raymii.org/s/snippets/Log_all_Item_properties_and_functions_in_Qml.html?utm_medium=rss&amp;utm_source=raymii&amp;utm_campaign=tagrss</link> 
                <guid>https://raymii.org/s/snippets/Log_all_Item_properties_and_functions_in_Qml.html</guid>
                <description>This small snippet of Javascript logs all properties and functions of a Qml Item. This is useful when you're knees-deep in a dynamic control that has a model and you're wondering why your code does not work. Probably because you're not using the correct property name. Or at least, that is something I often have. Logging all properties or functions helps to figure out that issue.</description> 
                <pubDate>Wed, 09 Feb 2022 00:00:00 GMT</pubDate>
                <lastBuildDate>Wed, 09 Feb 2022 00:00:00 GMT</lastBuildDate>
            </item>
    
            <item>
                <title>Loop over all Repeater items or Delegate's in Qml</title> 
                <link>https://raymii.org/s/snippets/Loop_over_all_Repeater_items_or_Delegates_in_Qml.html?utm_medium=rss&amp;utm_source=raymii&amp;utm_campaign=tagrss</link> 
                <guid>https://raymii.org/s/snippets/Loop_over_all_Repeater_items_or_Delegates_in_Qml.html</guid>
                <description>This small snippet shows how to loop over all Repeater items in Qml and also over all Delegate items in Qml. There are sublte differences between the two.
I'm using this to update visual all items in a control, before syncing state to a networked backend, and if the backend actions fails, I undo the visual state change. The network backend could be slow, by keeping state locally and syncing in the background, the user can continue working.</description> 
                <pubDate>Wed, 09 Feb 2022 00:00:00 GMT</pubDate>
                <lastBuildDate>Wed, 09 Feb 2022 00:00:00 GMT</lastBuildDate>
            </item>
    
            <item>
                <title>Qt/QML: Expose C++ classes to QML and why setContextProperty is not the best idea</title> 
                <link>https://raymii.org/s/articles/Qt_QML_Integrate_Cpp_with_QML_and_why_ContextProperties_are_bad.html?utm_medium=rss&amp;utm_source=raymii&amp;utm_campaign=tagrss</link> 
                <guid>https://raymii.org/s/articles/Qt_QML_Integrate_Cpp_with_QML_and_why_ContextProperties_are_bad.html</guid>
                <description>In this article I'm going to discuss the different ways to expose a C++ class to QML. QML is a markup language (part of the QT framework) like HTML/CSS, with inline JavaScript that can interact with the C++ code of your (QT) application. There are multiple ways to expose a C++ class to QML, each with their own benefits and quirks. This guide will cover three integration methods, `qmlRegisterSingletonType&lt;&gt;`, `rootContext-&gt;setContextProperty()` and `qmlRegisterType&lt;&gt;`. We'll end off with a simple benchmark showing the difference in startup times between the first two. </description> 
                <pubDate>Sun, 03 Oct 2021 00:00:00 GMT</pubDate>
                <lastBuildDate>Sun, 03 Oct 2021 00:00:00 GMT</lastBuildDate>
            </item>
    
            <item>
                <title>Rectangle{} debugging in QML, just like printf(), but for QT</title> 
                <link>https://raymii.org/s/articles/Rectangle_debugging_in_QML_just_like_printf.html?utm_medium=rss&amp;utm_source=raymii&amp;utm_campaign=tagrss</link> 
                <guid>https://raymii.org/s/articles/Rectangle_debugging_in_QML_just_like_printf.html</guid>
                <description>Recently I've been using a debugging technique in QT/QML that I've decided to name `Rectangle{}` debugging, in the same vein as `printf()` debugging. QML is a markup language (part of the QT framework) like HTML/CSS, with inline Javascript that can interact with the C++ code of your (QT) application. QML has the concept of `anchors` for relative positioning of elements. Overall, `anchors` work quite well, but can get complex when inheretance and complicated layouts come into play. The `Rectangle{}` style of debugging places a semi-transparent rectangle with a border around your element so you can visualize the positioning and see what effect your changes have. This article shows an example where I recently applied this style of debugging at work in our coffee machine user interface, including some tips to do actual `printf()` style debugging (but with `Console.log`).</description> 
                <pubDate>Wed, 08 Sep 2021 00:00:00 GMT</pubDate>
                <lastBuildDate>Wed, 08 Sep 2021 00:00:00 GMT</lastBuildDate>
            </item>
    
            <item>
                <title>Disable (debug) logging in QT and QML</title> 
                <link>https://raymii.org/s/articles/Disable_logging_in_QT_and_QML.html?utm_medium=rss&amp;utm_source=raymii&amp;utm_campaign=tagrss</link> 
                <guid>https://raymii.org/s/articles/Disable_logging_in_QT_and_QML.html</guid>
                <description>In QT you can use a few functions from the `qDebug.h` header like `qDebug()` and `qWarning()` to log information to the console. In QML you can use the likes of `console.log()`, `console.error()`. It's also very easy to implement your own logger (eg. `SyslogMessageHandler`) if you want something different, like logging to syslog and the console.
In this post I'll show you how to disable both forms of logging in a release build, qml and qt have different ways to manage their output.</description> 
                <pubDate>Sat, 27 Feb 2021 00:00:00 GMT</pubDate>
                <lastBuildDate>Sat, 27 Feb 2021 00:00:00 GMT</lastBuildDate>
            </item>
    
        </channel>
    </rss>
    
    