アプリケーションのデバッグ
デバッグできます:
- Visual Studio のデバッガを使用した Qt C++ アプリケーション。
- Qt Quick QML デバッグエンジンを使用したアプリケーション。
- GDB を使用した Linux 上のアプリケーション。
デバッグの開始
デバッグセッションを開始するには
- Debug >Start Debugging にアクセスしてください。
- CMake プロジェクトをデバッグするには、Solution Explorer でメイン・ソース・ファイルを選択し、コンテキスト・メニューからSet as Startup Item を選択します。
- F5 キーを押します。
ブレークポイントの設定
C++ や QML ファイルにブレークポイントを設定し、コードの実行をステップ実行します。ブレークモードでは、変数を監視して値を変更したり、任意の式を評価することができます。Qt Quick アプリケーションの場合、QML デバッグセッションは C++ デバッギングセッションと同時に実行されるため、同じデバッグセッション中に C++ と QML の両方でブレークポイントを設定し、変数をウォッチすることができます。
チュートリアル:Qt Quick デバッグ、クロスコンパイル、Linux でのデバッグ、QML デバッグの有効化、 Qt Quick アプリケーションのデバッグ、C++ 型の可視化も参照してください 。
© 2026 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.