code is emotional
Giovanni Montano wrote:It is possible to execute a program that goes through the code and as output reports the exact order the rows in eclipse are executed?
I mean an algorithm that inserts a system.out.println (in android a Log.d) at the end of every line copying the content of the row immediately up to the system.out println, so that in a file of txt I can see exactly in which order all the instruction have been executed?
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Winston Gutkowski wrote:
Yes. It's called a debugger, and Eclipse has one built in. Furthermore, it shows you what is being executed in context - ie, in the IDE itself - so you can inspect the values of almost anything; not the just the variables in the lines you're currently looking at.
Winston
code is emotional
Ulf Dittmer wrote:What you just said reinforces my belief that you simply lack practice in using debuggers. Debuggers are for hunting down specific behavior (generally bugs) in the code, not for understanding how the various pieces of an app work together. You would set breakpoints where you want to study behavior, not all over the place.
You're right that any GUI code (and Android's in particular) is not executed particularly sequentially, due to the use of many callbacks. But an understanding and "feel" of that will come automatically as you develop more. Maybe the project you're working on now is a bit too advanced for your level of experience, or has too many classes, and you have an easier time starting with something a bit simpler.
code is emotional
Paul Clapham wrote:When I read your posts, it seems to me that the way you use the debugger involves only setting breakpoints. When I use the debugger I step through the code one line at a time, using the "step forward" and "step into" buttons in Eclipse. It seems that you haven't discovered those buttons yet.
code is emotional
Giovanni Montano wrote:but to be honest still I am curious to know if advanced developer can use tools based on reflection to examine larger amount of "flux", and mainly why i cannot found example in internet, it looks like I am the first guy that is thinking to do this, that could be an unvaluable feature for newcomers
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
code is emotional
code is emotional
Consider Paul's rocket mass heater. |