外部アプリケーションの起動とデバッグ
プロジェクトを使用せずにローカルまたはリモートマシン上の実行可能ファイルをデバッグするには、アプリケーションをデバッグするデバイスを特定するビルド&ランキットを指定します。
外部デバッガの開始モードでは、Qt Creator でプロジェクトを開く必要はありませんが、プロジェクトを開いておくと、ブレークポイントの設定やコードのステップ実行が簡単になります。
外部アプリケーションを起動してデバッグするには
- Debug >Start Debugging >Start and Debug External Application に進みます。

- Kit で、プロジェクトのビルドに使用するビルド&ラン・キットを選択します。
- Local executable で、ローカル・マシン上で実行可能なアプリケーションへのパスを指定します。
- Command line arguments で、実行ファイルに渡すコマンド・ライン引数を指定します。
- Working directory では、作業ディレクトリを指定します。デフォルトはビルド結果のディレクトリです。
- コンソール・アプリケーションの場合は、Run in terminal を選択します。
- メイン関数でデバッガを停止するには、Break at "main" を選択します。
target extended-remote modeで接続を作成するには、Use target extended-remote to connect を選択します。このモードでは、デバッ グ対象のアプリケーションが終了するか、アプリケーションから切り離しても、デバッガーは ターゲットに接続されたままになります。アプリケーションを再実行したり、実行中のアプリケー ションにアタッチしたり、ターゲット固有のモニター・コマンドを使用したりできます。例えば、GDB は--onceオプションを使用して起動されない限り終了しませんが、monitor exitコマンドを使用することで終了させることができます。- Override SysRoot では、デフォルトの
sysrootの代わりに使用するsysrootのパスを指定します。 - Debug information では、デバッグ情報を格納する場所を指定します。空のパスは使用できません。
- Recent では、使用する最近の構成を選択できます。
プロジェクトのキットを有効にする」、「How To: Debug」、「デバッグ」、「デバッガ」、「デバッガ」も参照してください 。
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.