Software Archive
Read-only legacy content

Debug Tab

Spiros_N_
Beginner
1,521 Views

Now that my mobile project grown to 8.5K lines of code

The Debug on the latest build is very unstable. 
- 4 to 10 times is doesn't update the latest sources on device.
- 4 to 10 "Transferring you project files to debug device" never ends
- 2 to 10 times can't find connected device 
and every now and then the XDK
crashes, especially when connected device is an IPHONE.

Is there something I can do? I keep restarting XDK every time I want to debug.


 


 

 

 

 

0 Kudos
12 Replies
PaulF_IntelCorp
Employee
1,521 Views

One thing I have found that can sometimes help with large apps, when using the Debug tab, is to first start the app using the "run" button. After it is running, then push the "debug" icon. Please give that a try and see if it helps.

0 Kudos
Spiros_N_
Beginner
1,521 Views

Thanks Paul.
I do that also but it doesn't work most of the times 

0 Kudos
PaulF_IntelCorp
Employee
1,521 Views

Another thing to consider is how busy your app is during initialization. Does your app immediately start consuming CPU cycles? Or does it initialize and then go into an idle state waiting for events? If your app gets very busy and stays busy as soon as it starts, that can interfere with the debug parts of App Preview ever getting a chance to run. Are you able to provide a version of your app that I could try, that might help. Push the "Send Author A Message" link on my post to create a private message where you can attach a file.

0 Kudos
Spiros_N_1
Beginner
1,521 Views
You may have a point on CPU load at startup but in it looks like there is a temporary files/memory not cleared issue by the App Preview or the XDK.An XDK/App Preview restart solves the problem in most of the times. Also after some successful debug sessions,suddenly, the most resent code changes not transfered to connected device and after a few more attempts the XDK stops responding or restarts.
0 Kudos
PaulF_IntelCorp
Employee
1,521 Views

Thanks for the bug info. Is it sufficient to restart App Preview on the device? Or must you also restart the XDK? If we can narrow down the source of the problem, and provide a way to reproduce the issue, I can get something in front of engineering to [hopefully] resolve the issue.
 

0 Kudos
Barry_Johnson
New Contributor I
1,521 Views

Paul - your comment about high CPU use at startup potentially impacting the ability to establish the debug connection is a helpful one for future reference. I usually get a decent debug connection, and if not, a close & reopen of the XDK fixes things up.

0 Kudos
Spiros_N_
Beginner
1,521 Views

The only way to make debug work is close XDK and then 

DEL /F /Q C:\Users\[username]\AppData\Local\XDK\Cache\*.* 
DEL /F /Q /S C:\Users\[username]\AppData\Local\XDK\xdk-scratchdir\*.*

and then restart XDK.

after that debug works for the first time only. The second time I get a: 
"Uncaught module cordova/plugin list not found" in logs and stops.

So I  make a BAT file to run the above coomands and restart every time ...
Is there any other fix for this issue?

 

 

 

0 Kudos
PaulF_IntelCorp
Employee
1,521 Views

@Spiros -- are you getting a "crash report" when the XDK stops? If so, have you been submitting those reports? They are watched carefully by our engineering group, so sending them does help.

If you are not getting such a crash report, please let me know and I will forward your details in a bug report.

0 Kudos
Spiros_N_
Beginner
1,521 Views

No there is not "crash report" the debug tab only stops working and "Uncaught module cordova/plugin list not found" comes in debugger log

0 Kudos
PaulF_IntelCorp
Employee
1,521 Views

Spiros, can you provide me with a complete project that causes this to happen? It will be very helpful in getting a fix from engineering. Please include your entire project directory, not just the www directory. You can remove any directory named plugins, that is unnecessary, but the <project-name>.xdk file is very important. You can attach it to a private message (use the "Send Author A Message" link on my post).

0 Kudos
Juan_Rubén_M_
Beginner
1,521 Views

I have the exact same problem, but my project is 4 files, with a dozen lines each.

I got so frustrated that I ditched my trusty ubuntu-MBP laptop, cleared a path on my desk and setup a brand new desktop. Same thing.

I cannot get a reliable, repetible output from the debug module. 10 clicks on the debug icon give me about six restarts with the old code, and maybe sometimes a run on the latest code. 

It does not matter if I'm debugging inside a physical device, or an emulator (i'm doiung Android testing ATM)

The debug tab is _extremely_ unreliable :-(

0 Kudos
PaulF_IntelCorp
Employee
1,521 Views

Juan, can you provide a sample app that results in the issues you are seeing? You are seeing this with the Emulate tab AND with the Debug tab? I'm surprised that you are seeing these issues with the Debug tab. Note that the "debugger" is Chrome Debug Tools (the same CDT that you find in your Chrome desktop browser), but the specific version of CDT you get when using the Debug tab depends heavily on the version of Crosswalk you have selected in the Crosswalk Build Settings for your project. Does the debug behavior, when using the Debug tab, change if you change the version of Crosswalk? For example, change the CLI to 5.1.1 and make sure the Crosswalk version is set to 15.

0 Kudos
Reply