Slides with references to my JavaZone 2016 talk "Java Debugging Tricks". Slides on their own are not that informative, but contain references. Check out the video for actual demonstration: https://2016.javazone.no/program/java-debugging-tricks
9. Step Out- Code Evaluation
• Both in Java editor and free form
• Nothing is private
• Watches
• In breakpoints
• Nested evaluations / breaks
• Scrapbook
10. Execution Order
• Code evaluation
• Controlling your steps and breaks
• Manipulating code flow
• Tracking classes and objects
• Ensuring WYSIWYG
• Debugging concurrent code
• Customizing the debugger
Welcome everyone to this session where I will be focusing on debugging.
My name is bla bla.
I like to learn from other developers. Pick up some ideas. So what I plan to do is to demonstrate a few familiar scenarios, where we are in a debug session, and want to find out something or solve a problem. We will see what features and techniques can be used. Some of it may be known to you already, and in that case credit to you. Hopefully other things may be new or used in a different way than what you are used to.
Hope show you something new today. Also some custom plugin functionality that is guaranteed to be new.
I will also demonstrate some custom plugin functionality that is guaranteed to be new.
I intend to look at the following topics. I have organized them according to what I myself found the most productive and rewarding from the top. That also solve quite common problems, and then more exotic tips towards the end.
First I want to look at the debuggers ability to evaluate Java code on the fly. What it can be used for. Also in what way it is limited to normal code, but also cases where you can achieve things that you are not able to with normal code in your application.
Then I would like to look at how the debugger can be used to manipulate the flow of an application. For instance if you want to test your application in a scenario, that may not be easily or consistently reproducable.
Then I want to look at what tools there are to make stepping code and setting breakpoints as efficient and
Some words on visual setup, which is not the same as I would normally use.
These days I guess the trend is to concentrate on editing code as you work, with things like the distraction free mode in IntelliJ.
When I debug however I prioritize differently. I normally do not have to see that many lines of code to troubleshoot, but I do want to have critical information at my fingertips. Normally you would have a large screen that allow you to arrange the different views at dedicated places. I guess many people have several large screens, so you can even distribute views over several windows or have floating views spread out. The moment you find a certain view not needed or a distraction, you can simply minimize it. If you find that your debug session takes you into a more active browsing and coding mode, you can simply maximize the editor, change perspective in Eclipse or go to distraction free mode in IntelliJ. What you really don’t want is to have to constantly change views in order to find the information you are looking for.
If we look at this Eclipse example for instance. I normally like quite a lot of space for threads and frames, always have the variables visible. If I use watch expressions actively I would like to have them visible as well. If I’m debugging tests, I might want to keep track of the progress. Depending on the application I often want quite a lot of the console visible, also to keep track of what is going on. If I evaluate a lot of code on the fly, I might keep the Display view open, but most of the time it is sufficient to bring it up when I need it.
If we take a similar look at IntelliJ.
I intend to look at the following topics. I have organized them according to what I myself found the most productive and rewarding from the top. That also solve quite common problems, and then more exotic tips towards the end.
First I want to look at the debuggers ability to evaluate Java code on the fly. What it can be used for. Also in what way it is limited to normal code, but also cases where you can achieve things that you are not able to with normal code in your application.
Then I would like to look at how the debugger can be used to manipulate the flow of an application. For instance if you want to test your application in a scenario, that may not be easily or consistently reproducable.
Then I want to look at what tools there are to make stepping code and setting breakpoints as efficient and
Eclipse: Editor + Display + Scratch, breakpoint and evaluate, Log as part of conditional breakpoint. Terminate evaluation, Scratch: stream, regex, byte manipulation
IntelliJ : Evaluate private, expression vs snippet, history, alt + operators, keep in scratch. Use appendable to log as part of conditional breakpoint.
NB
I intend to look at the following topics. I have organized them according to what I myself found the most productive and rewarding from the top. That also solve quite common problems, and then more exotic tips towards the end.
First I want to look at the debuggers ability to evaluate Java code on the fly. What it can be used for. Also in what way it is limited to normal code, but also cases where you can achieve things that you are not able to with normal code in your application.
Then I would like to look at how the debugger can be used to manipulate the flow of an application. For instance if you want to test your application in a scenario, that may not be easily or consistently reproducable.
Then I want to look at what tools there are to make stepping code and setting breakpoints as efficient and
Eclipse: Editor + Display + Scratch, breakpoint and evaluate
IntelliJ : Evaluate private, expression vs snippet, history, alt + operators
I intend to look at the following topics. I have organized them according to what I myself found the most productive and rewarding from the top. That also solve quite common problems, and then more exotic tips towards the end.
First I want to look at the debuggers ability to evaluate Java code on the fly. What it can be used for. Also in what way it is limited to normal code, but also cases where you can achieve things that you are not able to with normal code in your application.
Then I would like to look at how the debugger can be used to manipulate the flow of an application. For instance if you want to test your application in a scenario, that may not be easily or consistently reproducable.
Then I want to look at what tools there are to make stepping code and setting breakpoints as efficient and
Eclipse: Editor + Display + Scratch, breakpoint and evaluate
IntelliJ : Evaluate private, expression vs snippet, history, alt + operators
I intend to look at the following topics. I have organized them according to what I myself found the most productive and rewarding from the top. That also solve quite common problems, and then more exotic tips towards the end.
First I want to look at the debuggers ability to evaluate Java code on the fly. What it can be used for. Also in what way it is limited to normal code, but also cases where you can achieve things that you are not able to with normal code in your application.
Then I would like to look at how the debugger can be used to manipulate the flow of an application. For instance if you want to test your application in a scenario, that may not be easily or consistently reproducable.
Then I want to look at what tools there are to make stepping code and setting breakpoints as efficient and
I intend to look at the following topics. I have organized them according to what I myself found the most productive and rewarding from the top. That also solve quite common problems, and then more exotic tips towards the end.
First I want to look at the debuggers ability to evaluate Java code on the fly. What it can be used for. Also in what way it is limited to normal code, but also cases where you can achieve things that you are not able to with normal code in your application.
Then I would like to look at how the debugger can be used to manipulate the flow of an application. For instance if you want to test your application in a scenario, that may not be easily or consistently reproducable.
Then I want to look at what tools there are to make stepping code and setting breakpoints as efficient and
I intend to look at the following topics. I have organized them according to what I myself found the most productive and rewarding from the top. That also solve quite common problems, and then more exotic tips towards the end.
First I want to look at the debuggers ability to evaluate Java code on the fly. What it can be used for. Also in what way it is limited to normal code, but also cases where you can achieve things that you are not able to with normal code in your application.
Then I would like to look at how the debugger can be used to manipulate the flow of an application. For instance if you want to test your application in a scenario, that may not be easily or consistently reproducable.
Then I want to look at what tools there are to make stepping code and setting breakpoints as efficient and
I intend to look at the following topics. I have organized them according to what I myself found the most productive and rewarding from the top. That also solve quite common problems, and then more exotic tips towards the end.
First I want to look at the debuggers ability to evaluate Java code on the fly. What it can be used for. Also in what way it is limited to normal code, but also cases where you can achieve things that you are not able to with normal code in your application.
Then I would like to look at how the debugger can be used to manipulate the flow of an application. For instance if you want to test your application in a scenario, that may not be easily or consistently reproducable.
Then I want to look at what tools there are to make stepping code and setting breakpoints as efficient and