Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Msvs
Index -> Off Topic
Goto page Previous  1, 2
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
mirhagk




PostPosted: Thu Feb 16, 2012 10:54 pm   Post subject: RE:Msvs

Demonwasp that java/eclipse integration is precisely what I'm talking about. The android simulator runs in a seperate process, with no way to enact the IDE. I'm pretty sure it writes all it's failures to a simple log file, then eclipse loads these errors. (unfortunately the stack trace is done by order of being called, and it always jumps focus to the end, ie the outermost function, meaning you have to actually scroll up through them all to find the correct one). I believe it is able to jump to the function that generated the error once you find it in the list, but still does not provide additional information, and since the android app was killed, all the state information is lost.

A great deal of my time debugging android apps was spent trying to find the function that generated the error. That alone is worth having the IDE nicely jump to the correct line that generated the error, showing it in a pop up, with links to help files to explain the error, and preserving not only state information, but the execution thread as a whole, giving you the ability to alter the line and continue running, without requiring a recompilation and deployment.

If eclipse/android had those debugging abilities (or possibly has and I'm just mistaken, please help me find them if it does) it'd save ALOT of my time, since probably half the time I spent developing was waiting for the app to redploy (even when the emulator was left running, it still took a long time for it to deploy this tiny file to the emulator for it to run).

The problem is not with the tools, it's with the integration.

PS: The reason I mentioned android with eclipse was because that's what I used to develop. I wasn't asking how to get android to run in eclipse, just asking why it wasn't integrated decently.
Sponsor
Sponsor
Sponsor
sponsor
DemonWasp




PostPosted: Thu Feb 16, 2012 11:54 pm   Post subject: RE:Msvs

I would assume that the reason Eclipse / Android integration is off is because of the whole connected-device bit. If it came with a simulator (as I am convinced all hardware devices should) you'd be able to debug like you would a normal application. Working with a physical device is different, because of the limits of the device and your connection to it.

Eclipse can do everything you mentioned in standard Java code. However, recompiling and loading class binaries works well when it's in the same JVM; doing it remotely in a Dalvik JVM on a connected device might be dicey (again, I don't know: I didn't write ADT).

I've seen varying levels of integration between connected device and IDE. J2ME (for older / cheaper phones, mostly) works great when run with the simulator, but debugging on an actual device doesn't work so well. The company I work for produces an Eclipse-based IDE that can debug software running on the device fairly well (no hot code swap, but live editing of variables, breakpoints and data-breakpoints and memory editing across several heterogenous cores and memory banks, etc).

You cannot compare local development (target platform = dev platform) and remote development.
mirhagk




PostPosted: Fri Feb 17, 2012 7:50 am   Post subject: RE:Msvs

Um do you read my posts.... It was run in the simulator, not on the device.

Even if it was run on the device, it should have those features, visual studio does. With visual studio you can connect your xbox via the network and debug it.

But yeah, it was with the simulator, and I could not do it. It actually got to the point where I'd develop stuff in C#/visual studio, and then transfer and convert it to Java, since visual studio was easier to use to debug.
DemonWasp




PostPosted: Fri Feb 17, 2012 10:49 am   Post subject: RE:Msvs

Hmm. I was sleepy, so I guess I misread "simulator" as "emulator". I suspect that the integration then is just not fully developed.

Visual Studio / XBox seems to be a different situation, because the XBox is actually a full computer, running an entire operating system. Clearly, Microsoft has built some kind of harness for remote debugging into the XBox operating system (good idea, there), and Google hasn't yet done that (or it isn't being used, or whatever).

Point stands, though: you can do all this stuff with free software.
mirhagk




PostPosted: Sat Feb 18, 2012 12:46 am   Post subject: RE:Msvs

Yes but the integration isn't very good for a lot of the free software. And the time saved with well integrated software is well worth the pitifully small cost.
md




PostPosted: Sat Feb 18, 2012 7:38 am   Post subject: Re: RE:Msvs

mirhagk @ 2012-02-18, 12:46 am wrote:
Yes but the integration isn't very good for a lot of the free software. And the time saved with well integrated software is well worth the pitifully small cost.


I can't help but disagree - Eclipse has much better integration with more technologies then any proprietary IDE I've heard of. Your experiences with Android seem to be a fault with your particular setup as remote debugging works just fine with Eclipse (used it plenty). The only issues I ever had with the emulator were related to it's not-entirely-complete implementation of the network stack, which means if you want to test things like UDP service announcement you need a real device to to debug on.

Also, it's most definitely an emulator that ships with the Android SDK and not a simulator, that's why the performance tends to be rather slow.
mirhagk




PostPosted: Sat Feb 18, 2012 11:11 am   Post subject: Re: RE:Msvs

DemonWasp @ Fri Feb 17, 2012 10:49 am wrote:
Hmm. I was sleepy, so I guess I misread "simulator" as "emulator". I suspect that the integration then is just not fully developed.
Visual Studio / XBox seems to be a different situation, because the XBox is actually a full computer, running an entire operating system. Clearly, Microsoft has built some kind of harness for remote debugging into the XBox operating system (good idea, there), and Google hasn't yet done that (or it isn't being used, or whatever).

It is an emulator, but it was not deployed to a device. Although it doesn't even show the stack trace when it crashes on the connected device, which is also a full computer running an entire operating system.

md wrote:
I can't help but disagree - Eclipse has much better integration with more technologies then any proprietary IDE I've heard of. Your experiences with Android seem to be a fault with your particular setup as remote debugging works just fine with Eclipse (used it plenty).


Eclipse has integration with more things, not better integration. A proprietary IDE that has all the tools built in is usually better integrated than a free technology which allows add-ons. I followed the set-up instructions exactly for setting up the android framework, it just dumps the error messages into logcat.
md




PostPosted: Sat Feb 18, 2012 4:27 pm   Post subject: Re: RE:Msvs

mirhagk @ 2012-02-18, 11:11 am wrote:
DemonWasp @ Fri Feb 17, 2012 10:49 am wrote:
Hmm. I was sleepy, so I guess I misread "simulator" as "emulator". I suspect that the integration then is just not fully developed.
Visual Studio / XBox seems to be a different situation, because the XBox is actually a full computer, running an entire operating system. Clearly, Microsoft has built some kind of harness for remote debugging into the XBox operating system (good idea, there), and Google hasn't yet done that (or it isn't being used, or whatever).

It is an emulator, but it was not deployed to a device. Although it doesn't even show the stack trace when it crashes on the connected device, which is also a full computer running an entire operating system.

md wrote:
I can't help but disagree - Eclipse has much better integration with more technologies then any proprietary IDE I've heard of. Your experiences with Android seem to be a fault with your particular setup as remote debugging works just fine with Eclipse (used it plenty).


Eclipse has integration with more things, not better integration. A proprietary IDE that has all the tools built in is usually better integrated than a free technology which allows add-ons. I followed the set-up instructions exactly for setting up the android framework, it just dumps the error messages into logcat.


Did you try running your android application through the debugger? 'Cause it's *exactly* the same as running apps on a real device. And an IDE that doesn't support my choice of tools kinda doesn't work. No integrated mercurial support? No thanks.
Sponsor
Sponsor
Sponsor
sponsor
mirhagk




PostPosted: Sat Feb 18, 2012 4:56 pm   Post subject: RE:Msvs

I did not use the command line to run the app lol, I used Eclipse and pressed the debug button, which loaded up the emulator (if not already running) installed the app, and then if the app crashed, it said the app has quit, and log cat shows the stack trace. That's it, doesn't jump to the problematic line or anything.
md




PostPosted: Mon Feb 20, 2012 9:39 am   Post subject: Re: RE:Msvs

mirhagk @ 2012-02-18, 4:56 pm wrote:
I did not use the command line to run the app lol, I used Eclipse and pressed the debug button, which loaded up the emulator (if not already running) installed the app, and then if the app crashed, it said the app has quit, and log cat shows the stack trace. That's it, doesn't jump to the problematic line or anything.


In eclipse there are a number of "run" buttons, only one of which runs the program through the debugger. If you use the wrong one it definitely won't work. After that you need to set some break points (where you'll need them you can figure out from from the logs) and then the debugger will stop when it gets there. If you don't set breakpoints then yes, the app will simply exit and show you the log.
mirhagk




PostPosted: Mon Feb 20, 2012 11:50 am   Post subject: RE:Msvs

Yes that is precisely the problem md, I don't know before hand where to place the breakpoints, until it crashes and I look at the log cat. Then it's fairly obvious what the issue is and doesn't require looking at the variable state usually, but if it did, it'd require me to put a breakpoint where it crashed, and have it only run on the condition that it does crash (for instance if a function is called several times with different parameters and only one set makes it crash) and then run the debugger again and get to the part that makes it crash.

In visual studio when it crashes it simply breaks at that line, which makes it faster to debug, and does not require me to know the exact condition that makes something crash to put a breakpoint there.
RandomLetters




PostPosted: Mon Feb 20, 2012 10:22 pm   Post subject: RE:Msvs

Huh? When it shows the stack trace, that gives you the line that failed
md




PostPosted: Mon Feb 20, 2012 10:39 pm   Post subject: Re: RE:Msvs

mirhagk @ 2012-02-20, 11:50 am wrote:
Yes that is precisely the problem md, I don't know before hand where to place the breakpoints, until it crashes and I look at the log cat. Then it's fairly obvious what the issue is and doesn't require looking at the variable state usually, but if it did, it'd require me to put a breakpoint where it crashed, and have it only run on the condition that it does crash (for instance if a function is called several times with different parameters and only one set makes it crash) and then run the debugger again and get to the part that makes it crash.

In visual studio when it crashes it simply breaks at that line, which makes it faster to debug, and does not require me to know the exact condition that makes something crash to put a breakpoint there.


That is admittedly a useful feature. I prefer to write code that doesn't throw uncaught exceptions though Wink

There is apparently a debug view that'll highlight the appropriate line from LogCat, but you're basically doing that anyway.
mirhagk




PostPosted: Mon Feb 20, 2012 10:47 pm   Post subject: RE:Msvs

Alright I got the debug mode working, except it does not show me the source, it gives me an error message that the source could not be found, and I tried to get it to load the correct source files (I know the exist in the path I gave it, as that's what is uses to load it in the editor).

It's just frustrating that one part of the same IDE can load the files fine, but another view (debug view) can't.
Display posts from previous:   
   Index -> Off Topic
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 2 of 2  [ 29 Posts ]
Goto page Previous  1, 2
Jump to:   


Style:  
Search: