Enable connection of Debuggers to DrKonqi
ClosedPublic

Authored by croick on Jan 30 2018, 10:43 PM.

Details

Summary
  • allows each debugger plugin of each active session to be selected for process attachment in DrKonqi
  • adds callbacks for end of debugging and closing of the plugin
  • removes QSignalMapper dependence
  • uses "obsolete" QDBusConnectionInterface::serviceOwnerChanged due to lack of alternatives
Test Plan
  • apply DrKonqi patch D10195 and start a new KDevelop session "test"
  • enable the DrKonqi debug button
  • enable ptrace
  • start a kde program (kate for instance)
  • start "drkonqi --dialog --appname kate --pid xxxx"
  • check Debug options: gdb, KDevelop (GDB) - test, KDevelop (LLDB) - test
  • start another KDevelop session "test2" -> additional debug options are now available
  • end session "test2" -> additional options vanished again
  • select "KDevelop (GDB) - test" -> KDevelop raises, DrKonqi buttons are disabled
  • use the GDB console to detach the process and end GDB
  • DrKonqi buttons are reenabled again

Diff Detail

Repository
R32 KDevelop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
croick created this revision.Jan 30 2018, 10:43 PM
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptJan 30 2018, 10:43 PM
croick requested review of this revision.Jan 30 2018, 10:43 PM

Actually I would prefer not to use QDBusConnectionInterface::serviceOwnerChanged, since it noisily complains about being used.
But I couldn't figure out what to use instead. The exact name of the service is not known, so QDBusServiceWatcher is not an option as far as I understand.

croick added a comment.Mar 1 2018, 9:03 PM

Any opinion about this?

mwolff accepted this revision.Mar 4 2018, 8:40 PM
mwolff added a subscriber: mwolff.

minor style stuff, but otherwise lgtm - at least I don't have any concrete improvement suggestions. if it works for you, let's go for it!

one idea though: can we somehow improve this step: enable the DrKonqi debug button? Like, automatically enable it while KDevelop is running or something like that? Though not every KDevelop user may want to debug KDE apps, still... Could be done I guess?

plugins/debuggercommon/midebuggerplugin.cpp
104 ↗(On Diff #26228)

m_dbusInterface

106 ↗(On Diff #26228)

m_valid

This revision is now accepted and ready to land.Mar 4 2018, 8:40 PM
apol added a subscriber: apol.Mar 5 2018, 12:21 AM

Once this is in, it would be really good to have a blog post on the planet about it. Thanks!

one idea though: can we somehow improve this step: enable the DrKonqi debug button? Like, automatically enable it while KDevelop is running or something like that? Though not every KDevelop user may want to debug KDE apps, still... Could be done I guess?

In D10196#218613, @apol wrote:

Once this is in, it would be really good to have a blog post on the planet about it. Thanks!

Certainly! But before this can be advertised, a face-lift of that button should be done...

This revision was automatically updated to reflect the committed changes.