Quantcast
Channel: Intel Developer Zone Articles
Viewing all articles
Browse latest Browse all 3384

Intel® XDK FAQs - Debug & Test

$
0
0
 What are the requirements for Testing on Wi-Fi? [Testing]

1) Both Intel XDK and App Preview mobile app must be logged in with the same user credentials.

2) Both devices must be on the same subnet.

Note: Your computer's Security Settings may be preventing Intel XDK from connecting with devices on your network. Double check your settings for allowing programs through your firewall. At this time, testing on Wi-Fi does not work within virtual machines.

 How do I configure app preview to work over Wi-Fi? [App Preview]

1) Ensure that both Intel XDK and App Preview mobile app are logged in with the same user credentials and are on the same subnet

2) Launch App Preview on the device 

3) Log into your Intel XDK account 

4) Select "Local Apps" to see a list of all the projects in Intel XDK Projects tab 

5) Select desired app from the list to run over Wi-Fi  

Note: Ensure the app source files are referenced from the right source directory. If it isn't, on the Projects Tab, change the 'source' directory so it is the same as the 'project' directory and move everything in the source directory to the project directory. Remove the source directory and try to debug over local Wi-Fi.

 How do I clear app preview cache and memory? [App Preview]

[Android*] Simply kill the app running on your device as an Active App on Android* by swiping it away after clicking the "Recent" button in the navigation bar. Alternatively, you can clear data and cache for the app from under Settings App > Apps > ALL > App Preview. 

[iOS*] By double tapping the Home button then swiping the app away. 

[Windows*] You can use the Windows* Cache Cleaner app to do so.

 What are the Android* devices supported by App Preview? [App Preview/Android*]

We officially only support and test Android* 4.x and higher, although you can use Cordova for Android* to build for Android* 2.3 and above. For older Android* devices, you can use the build system to build apps and then install and run them on the device to test. To help in your testing, you can include the weinre script tag from the Test tab in your app before you build your app. After your app starts up, you should see the Test tab console light up when it sees the weinre script tag contact the device (push the "begin debugging on device" button to see the console). Remember to remove the weinre script tag before you build for the store. 

 What do I do if Intel XDK stops detecting my Android* device? [Debug/Android*]

When Intel XDK is not running, kill all adb processes that are running on your workstation and then restart Intel XDK as conflicts between different versions of adb frequently causes such issues. Ensure that applications such as Eclipse that run copies of adb are not running. You may scan your disk for copies of adb: 

[Linux*/OS X*]:

$ sudo find / -name adb -type f 

[Windows*]:

> cd \> dir /s adb.exe

For more information on Android* USB debug, visit the Intel XDK documentation on debugging and testing.

 My third party plugins do not show up on the debug tab. How do I debug an app that contains third party plugins? [Debug]

If you are using the Debug, Emulate or Test tabs you will not see any third-party plugins. At the moment, the only way to debug an app that contains a third-party plugin is to build it and debug the built app installed on your device. We are working on a solution to work with third-party plugins, but it is still in development. 

[Android*]

1) For Crosswalk* or Cordova for Android* build, create an intelxdk.config.additions.xml file that contains the following lines: 

<!-- Change the debuggable preference to true to build a remote CDT debuggable app for --><!-- Crosswalk* apps on Android* 4.0+ devices and Cordova apps on Android* 4.4+ devices. --><preference name="debuggable" value="true" /><!-- Change the debuggable preference to false before you build for the store. --> 

and place it in the root directory of your project (in the same location as your other intelxdk.config.*.xml files). Note that this will only work with Crosswalk* on Android* 4.0 or newer devices or, if you use the standard Cordova for Android* build, on Android* 4.4 or greater devices.

2) Build the Android* app

3) Connect your device to your development system via USB and start app

4) Start Chrome on your development system and type "chrome://inspect" in the Chrome URL bar. You should see your app in the list of apps and tabs presented by Chrome, you can then push the "inspect" link to get a full remote CDT session to your built app. Be sure to close Intel XDK before you do this, sometimes there is interference between the version of adb used by Chrome and that used by Intel XDK, which can cause a crash. You might have to kill the adb process before you start Chrome (after you exit the Intel XDK). 

[iOS*]

Refer to the instructions on the updated Debug tab docs to get on-device debugging. We do not have the ability to build a development version of your iOS* app yet, so you cannot use this technique to build iOS* apps. However, you can use the weinre script from the Test tab into your iOS* app when you build it and use the Test tab to remotely access your built iOS* app. This works best if you include a lot of console.log messages.

[Windows* 8]

You can use the test tab which would give you a weinre script. You can include it in the app that you build, run it and connect to the weinre server to work with the console.  

Alternatively, you can use App Center to setup and access the weinre console (go here and use the "bug" icon).  

Another approach is to write console.log messages to a <textarea> screen on your app. See either of these apps for an example of how to do that:  

 Why does my device show as offline on Intel XDK Debug? [Debug] 
“Media” mode is the default USB connection mode, but due to some unidentified reason, it frequently fails to work over USB on Windows* machines. Configure the USB connection mode on your device for "Camera" instead of "Media" mode.
 What do I do if my remote debugger does not launch? [Debug] 

You can try the following to have your app run on the device via debug tab:  

  • Place the intelxdk.js library before the </body> tag
  • Place the app specific .js file after it
  • Place the call of initialization in the device ready event function
 Why does it fail when I try to push files to the server for debugging on device? [Debug]

This problem seems to happen primarily on Android* 4.0 devices and is being looked into by our engineers.

Back to FAQs Main 


Viewing all articles
Browse latest Browse all 3384

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>