Proses debug jarak jauh di Android
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Karena perbedaan antara lingkungan pengembangan dan lingkungan eksekusi, beberapa
masalah hanya terjadi pada perangkat fisik tertentu.
Saat ini, proses debug kode jarak jauh sangat penting. Hal ini dapat membantu Anda menemukan
masalah dengan cepat, sehingga menghemat waktu Anda.
Untungnya, proses debug kode jarak jauh sangat mudah di Cocos Creator.
Untuk melakukan proses debug kode jarak jauh di perangkat fisik, cukup ikuti 3 langkah berikut:
Pastikan perangkat Android berada di LAN yang sama dengan komputer yang Anda
gunakan untuk proses debug. (Jangan aktifkan proxy selama proses debug, jika tidak,
koneksi mungkin akan gagal.)
Pilih platform Android, dan centang Debug mode di panel Build
Cocos Creator, lalu bangun dan jalankan. 
Buka Chrome DevTools untuk proses debug jarak jauh dengan membuka
alamat berikut di browser Chrome. (Anda harus mengganti <device_LAN_IP>
dengan alamat IP perangkat seluler yang benar). Selanjutnya, Anda dapat memulai proses debug
jarak jauh pada kode TypeScript di project.
devtools://devtools/bundled/js_app.html?v8only=true&ws=<device_LAN_IP>:6086/00010002-0003-4004-8005-000600070008

Untuk petunjuk yang lebih detail, Anda dapat melihat dokumentasi
Cocos
Creator resmi.
Konten dan contoh kode di halaman ini tunduk kepada lisensi yang dijelaskan dalam Lisensi Konten. Java dan OpenJDK adalah merek dagang atau merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-27 UTC.
[null,null,["Terakhir diperbarui pada 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)."]]