CDB로 원격 디버깅
원격 컴퓨터 또는 컨테이너가 Windows를 실행하고 애플리케이션이 MSVC를 사용하여 컴파일된 경우 CDB를 사용하여 원격 디버깅을 할 수 있습니다.
애플리케이션의 원격 실행이 이미 설정되어 있고 Run 버튼(또는 Ctrl+R)을 선택하여 작동하는 경우 Debug 버튼(또는 F5)을 선택하여 원격 디버깅을 시작할 수 있습니다.
원격 모드에서 로컬 CDB 프로세스는 원격 컴퓨터에서 실행되는 CDB 프로세스와 대화합니다. 프로세스는 서버 모드로 전환하는 특수 명령줄 옵션으로 시작됩니다. 원격 CDB 프로세스는 Qt Creator 과 함께 제공되는 Qt Creator CDB 확장 라이브러리를 로드해야 합니다:
- 원격 컴퓨터에 Windows용 디버깅 도구를 설치합니다. 설치 폴더에는 CDB 명령줄 실행 파일(
cdb.exe)이 있습니다. - Qt Creator CDB 확장 라이브러리와 종속 요소를 Qt 설치 디렉터리에서 원격 시스템의 새 폴더로 복사합니다(사용하는 Windows용 디버깅 도구 버전에 따라 32비트 또는 64비트 버전):
\lib\qtcreatorcdbext32(32비트)\lib\qtcreatorcdbext64(64비트)
- 해당 폴더를 가리키도록 _NT_DEBUGGER_EXTENSION_PATH 환경 변수를 설정합니다.
- 통신 프로토콜로 TCP/IP를 사용하려면 다음과 같이 원격 CDB를 실행합니다:
cdb.exe -server tcp:port=1234 <executable>
- Qt Creator 을 실행하는 로컬 컴퓨터에서 Debug > Start Debugging > Attach to Remote CDB Session 을 선택합니다.
- Connection 필드에 연결 매개변수를 입력합니다. 예를 들어, TCP/IP의 경우
Server:Port
다른 프로토콜을 선택한 경우 대체 형식 중 하나를 지정합니다:
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]
- OK 을 선택하여 디버깅을 시작합니다.
CDB 프로세스 관리를 위한 설정을 지정하려면 환경설정 > Debugger > CDB 으로 이동하세요.
Copyright © The Qt Company Ltd. and other contributors. 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.