Software Archive
Read-only legacy content
17061 Discussions

Unable to debug Javascript/CSS in Mac OS X

Daniel_H_8
Beginner
275 Views

In general Intel XDK experience in Mac OS X is terrible, the editor is very slow, debugger is super slow and in general everything is unstable and the app keeps crashing.  But since the last couple of updates it became unusable, unfortunatelly when I'm trying to debug my app using the emulator, is almost impossible to get the code to stop on the breakpoints set on the javascript that is executed at the very begining of the app, also it started stopping on random javascript lines and the most problematic for me is when I select an element from the HTML panel on the chromium debugger, the css styles shown are for a totally different element so I don't know what to do.  Probably I'll have to switch to windows for development.

I'm using IntelXDK version 2727 and I've updated my Mac OS X version to "El Capitan" thinking that something could be fixed but still the same issues that I had with Yosemite

0 Kudos
4 Replies
Dale_S_Intel
Employee
275 Views

Sorry to hear you're having so much trouble.  I use XDK on the Mac pretty much every day, and while I've experienced some of the problems, I haven't seen all of them.

The thing I've had the most difficulty with is in using the debugger in the emulator.  LIke you I've had trouble getting it to break on initialization code and at other times having trouble setting breakpoints (i.e. I click on a line to set a break point and nothing happens.

There are a couple techniques I've found to help mitigate some of these issues.  It looks like  the Chrome Developer Tools (CDT) sometimes caches code such that it's not really running the same instance that you're testing, i.e. you make a change, rerun the emulator, but the debugger doesn't get tha code change.  For this I find sometimes restarting the emulator is enough, but other times I have to restart the XDK.

The other problem I've seen is when trying to break in initialization code.  I can't get the debugger window up fast enough to catch it, so the code has already executed by the time I click the button.  There are a couple thing I've done to help this.  One is to use the "debugger;" statement, so that the break point is in the code itself so the debugger doesn't need to wait for me to set it.  Another is to bring up the debugger, then restart by doing a Cmd-R in the debugger window.  This often works to stop initialization code, and the debugger statement can help in many situations.

I don't think I've seen the CSS problems you described, but if you can help me reproduce I'd be happy to help.

When it crashes, be sure to send th crash log (a choice in the dialog that comes up when it crashes) as that will help us figure out teh problem.

Again, I'm sorry it's been causing trouble for, hopefully we can get some of these things improved.  Any specific info you can provide that will help us reproduce the problems would be most helpful.

Thanks!

Dale

0 Kudos
Daniel_H_8
Beginner
275 Views

Thanks for your advice.  Its been a while since the last time I've used the debugger instruction inside my code but is a nice workaround, I was doing it with alerts.  And your mention of cache reminded me about some custom settings that I made for the DevTools, once I reset the settings to the defaults, no more non-matching CSS issues.  Thanks a lot.  I was able to work today and tonight in a very effective way so no switching to windows in the near future :) 

0 Kudos
Bertran_H_
Beginner
275 Views

I am using OSX 10.9.5 on 3.4 GHZ intel i7.

XDK version 3400

So I am on a MAC.

When I go to the emulator mode and click the debug button, the XDK crashes. Every time. I don't know another way to debug conveniently, setting alerts is just silly. Is there a way to stop this crashing? Otherwise I just need to go to MAMP or Brackets. I don't have time to waste time with broken developer tools.

0 Kudos
PaulF_IntelCorp
Employee
275 Views

We are removing the Emulate tab, in the next release, and replacing it with a component that runs in a separate process which is much more stable. You might try using the Debug tab, it has a much higher fidelity than the Emulate tab and it does not cause the XDK to crash.

0 Kudos
Reply