I found the DebugDialog code but was confused when setting dialogs.debug to 1 in preferences.xml didn't show the dialog.  So I changed the code in inkscape.cpp, line 573:

    if (use_gui == TRUE && prefs_get_int_attribute(" dialogs.debug", "redirect", DEFAULT_LOG_REDIRECT))
    {
        Inkscape::UI::Dialogs::DebugDialog::getInstance()->captureLogMessages();
        Inkscape::UI::Dialogs::DebugDialog::showInstance();
    }


Is this the right way to do this?

Adam