Android でのリモート デバッグ
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
開発環境と実行環境には違いがあるため、一部の問題は特定の実機でのみ発生します。
現時点では、コードのリモート デバッグが非常に重要です。問題をすばやく見つけることができるため、時間を大幅に短縮できます。
幸い、Cocos Creator ではコードのリモート デバッグを非常に簡単にできます。
実機でコードのリモート デバッグを行うには、次の 3 つの手順を実施します。
Android デバイスが、デバッグに使用するパソコンと同じ LAN 上にあることを確認します(デバッグ中はプロキシを有効にしないでください。有効にすると、接続できない可能性があります)。
Android プラットフォームを選択し、Cocos Creator の [ビルド] パネルで [デバッグモード] をオンにしてから、ビルドして実行します。
Chrome ブラウザで次のアドレスにアクセスし、リモート デバッグ用の Chrome DevTools を開きます(<device_LAN_IP>
の部分は、適切なモバイル デバイスの IP アドレスに置き換える必要があります)。これで、プロジェクト内の TypeScript コードに対してリモート デバッグを開始できます。
devtools://devtools/bundled/js_app.html?v8only=true&ws=<device_LAN_IP>:6086/00010002-0003-4004-8005-000600070008

詳しい手順については、公式の Cocos Creator ドキュメントをご覧ください。
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。Java および OpenJDK は Oracle および関連会社の商標または登録商標です。
最終更新日 2025-07-27 UTC。
[null,null,["最終更新日 2025-07-27 UTC。"],[],[],null,["# Remote debugging on Android\n\nDue to the differences between development and running environments, some\nproblems only occur on specific physical devices.\n\nAt this time, remote code debugging is very important. It can help you to locate\nthe problem quickly, saving you lots of time.\n\nFortunately, remote code debugging is very easy in Cocos Creator.\n\nTo perform remote code debugging on physical devices, just follow these 3 steps:\n\n1. Make sure the Android device is on the same LAN as the computer that you are\n using for debugging. (**Do not enable proxy during debugging, otherwise the\n connection may fail.**)\n\n2. Select the Android platform and check **Debug mode** in the **Build** panel\n of Cocos Creator, then build and run.\n\n3. Open the Chrome devtools for remote debugging by visiting the following\n address in the Chrome browser. (You'll need to replace `\u003cdevice_LAN_IP\u003e`\n with the correct mobile device's IP address.) You can then start the remote\n debugging on TypeScript code in your project.\n\n devtools://devtools/bundled/js_app.html?v8only=true&ws=\u003cdevice_LAN_IP\u003e:6086/00010002-0003-4004-8005-000600070008\n\nFor more detailed instructions, you can take a look at the official [Cocos\nCreator\ndocumentation](https://docs.cocos.com/creator/manual/en/editor/publish/debug-jsb.html)."]]