Debug remotely with CDB

In remote mode, the local CDB process talks to a CDB process that runs on the remote machine. The process is started with special command-line options that switch it into server mode. The remote CDB process must load the Qt Creator CDB extension library that is shipped with Qt Creator:

  1. Install the Debugging Tools for Windows on the remote machine. The installation folder has the CDB command-line executable (cdb.exe).
  2. Copy the Qt Creator CDB extension library and the dependencies from the Qt installation directory to a new folder on the remote machine (32 or 64 bit version depending on the version of the Debugging Tools for Windows used):
    • \lib\qtcreatorcdbext32 (32 bit)
    • \lib\qtcreatorcdbext64 (64 bit)
  3. Set the _NT_DEBUGGER_EXTENSION_PATH environment variable to point to that folder.
  4. To use TCP/IP as communication protocol, launch remote CDB as follows:
    cdb.exe -server tcp:port=1234 <executable>
  5. On the local machine running Qt Creator, select Debug > Start Debugging > Attach to Remote CDB Session.
  6. In the Connection field enter the connection parameters. For example, for TCP/IP:
    Server:Port

    If you chose some other protocol, specify one of the alternative formats:

    tcp:server=Server,port=Port[,password=Password][,ipversion=6]
    tcp:clicon=Server,port=Port[,password=Password][,ipversion=6]
    npipe:server=Server,pipe=PipeName[,password=Password]
    com:port=COMPort,baud=BaudRate,channel=COMChannel[,password=Password]
    spipe:proto=Protocol,{certuser=Cert|machuser=Cert},server=Server,pipe=PipeName[,password=Password]
    ssl:proto=Protocol,{certuser=Cert|machuser=Cert},server=Server,port=Socket[,password=Password]
    ssl:proto=Protocol,{certuser=Cert|machuser=Cert},clicon=Server,port=Socket[,password=Password]
  7. Click OK to start debugging.

To specify settings for managing the CDB process, go to Preferences > Debugger > CDB.

See also How To: Debug, CDB, Debugging, Debuggers, and Debugger.

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.