1

I have a clipboard program that implements a COM interface(IDataObject). The com server runs correctly, i.e., the com client can connect to it and retrieve data from it without problem. The problem is the COM server cannot break at breakpoints when a COM client calls it, i.e., when a client pastes the content from clipboard. Is this the designed behavior of Qt Creator,i.e., you cannot set breakpoints to debug a com server in Qt Creator?

ΦXocę 웃 Пepeúpa ツ
  • 47,427
  • 17
  • 69
  • 97
William
  • 761
  • 2
  • 10
  • 27
  • 1
    Of course you can debug COM server. I did. It is just a separate process. Though on Windows I would prefer debug with Visual Studio but absolutely no problem with Qt Creator per se. Run the process in the context of whatever debugger or attach to the process and debug. https://doc.qt.io/qtcreator/creator-debugger-operating-modes.html Also think of Q_ASSERT or assert statement wherever you like in debug compiled code of the COM server so that you will be able to attach the debugger exactly at the moment when it is needed e.g. Q_ASSERT(false). – Alexander V Jun 03 '21 at 19:47

1 Answers1

0

if you cant add breakpoint you can still print debug messages

#include<QDebug>

void SomeClass::SomeMethod(const QString& msg)
{
    qDebug() << "Message: " << msg;
}
ΦXocę 웃 Пepeúpa ツ
  • 47,427
  • 17
  • 69
  • 97