ÇáßæäÓá æÍÏÉ ãÑÇÞÈÉ áÇÎÊÈÇÑ ÇáÊØÈíÞ Console logs / Debug - ÇáßæÑÏæÝÇ æ ÇáÝæä ÌÇÈ
ÇáßæÑÏæÝÇ æ ÇáÝæä ÌÇÈ Phone Gap / Cordova

Çì ÇßæÇÏ ÊÓÊÎÏãåÇ Ýì ÇáÊØÈíÞ íÊØáÈ Úãá áåÇ ÇÎÊÈÇÑ Çæ ãÑÇÞÈÉ ÚãáåÇ æ Çä ßÇä åäÇß ÇÎØÇÁ ÈåÇ Çã áÇ

ãÚ ÇáÚáã ÞÈá äÔÑ ÇáÊØÈíÞ íÌÈ ÍÐÝå , ÍíË ÌæÌá áÇ ÊÞÈá ÈÇáÓãÇÍ ÈÊÝÚíá debug

ÈáæÌä cordova plugin console

ÇßÊÈ åÐÇ ÇáÇãÑ áÊËÈíÊ ÇáÈáæÌä

ßæÏ:
cordova plugin add cordova-plugin-console

æíÌÈ æÖÚ Ýì ãáÝ index.js ÏÇÎá function onDeviceReady ÇáßæÏ ÇáÊÇáì

ßæÏ:
console.log("console.log works well");
ØÑíÞå Úãáå ãä ÎáÇá ßÑæã.

-----------------------------------------------------------------------
ÌæÌá ßÑæã ßæäÓá Google Chrome Console
-----------------------------------------------------------------------

ÇÖÛØ R.CLick Ëã ÇÎÊÑ ÇÎÑ ÇÎÊíÇÑ Inspect Çæ ãä ÇáÇÎÊÕÇÑ " Ctrl+ Shift+I "

Ëã ÇÎÊÇÑ ÊÕäíÝ console ÓÊÌÏ ÌãíÚ ÇÎØÇÁ ÇáÊØÈíÞ Ýì åÐÇ ÇáãáÝ

æáßä åäÇß ÇÎØÇÁ Êßæä ÛíÑ ÕÍíÍÉ áÇäåÇ áÇ íäÝÚ ãÚåÇ ßæäÓá ãä ÎáÇá ÇáãÊÕÝÍ Ýåì ÊÚãá Úáì ÇáãæÈÇíá ÝÞØ

ãËá åÐÇ ÇáãáÝ.

ãáÝ cordova.js :

ßæÏ:
index.html:26 GET file:///C:/riseapp/risecordova/app1/www/cordova.js net::ERR_FILE_NOT_FOUND
you can not test your application on chrome. cordova.js file will be embedded after building the project. try building and deploying your app on the device or emulator.
äÚã åÐÇ ÇáãáÝ cordova.js ÛíÑ ãæÌæÏ ÏÇÎá www æáßä ãæÌæÏ ÏÇÎá app1\platforms\android\platform_www
æÇáÐì ÚäÏ Úãá ÈäÇÁ build ááÊØÈíÞ íÏãÌ ÏÇÎá apk
æÈÇáÊÇáì ÝåÐÇ ÇáãáÝ Óáíã ááãæÈÇíá æ ÛíÑ Óáíã ÈÔßá æåãì ááãÊÕÝÍ áÇäå áÇ íÝåãå


if you want to avoid these errors goto /platforms folder. after building the project all your files and a copy of cordova.js are there. if you open your applications main page form that folder you wont get file not found error.
áÇÊ ÍÏÏ ãÓÇÑ ááãáÝ æÇÌÚáå ÝÞØ ßãÇ åæ ãÙáá Ýì ÇáÇÓÝá
ßæÏ:
<script src="cordova.js"></script>
When you run cordova platform add android and then cordova build android, you should get a cordova.js added project/platforms/android/assets/www folders. You don't need to add it in your js files. so, just declare it in index.js file as follows,
ãáÍæÙÉ : ÇÐÇ áã íÚãá ãÚß ÇáßæäÓá ÈÓÈÈ ÓßíæÑÊì æ ÍÙÑ ÑÇÌÚ åÐÇ ÇáãæÖæÚ
ÇáÍãÇíÉ æÇáÍÙÑ ÓíÇÓÉ ÃãÇä ÇáãÍÊæì CSP Content Security Policy - ÇáßæÑÏæÝÇ æ ÇáÝæä ÌÇÈ


ÇáãÑÌÚ:

https://cordova.apache.org/docs/en/l...ole/index.html
https://stackoverflow.com/questions/...dova-js-errors
https://stackoverflow.com/questions/...d-in-ionic-app