We can visualize the debugger output by tapping on the Java Visualizer button at the top of the Debug tool. Step over or step into the code as you like. The way you do it is: Create a breakpoint ( double click on the side of the line). The visualizer supports StdIn, StdOut, most other stdlib libraries, Stack, Queue, and ST. The IDE has a debugger that you can use and has the same overall effect. It can be very useful as long as you're careful not to use it with methods that have side effects. This is similar to how the jGRASP debugger works. The visualizer is throwing an error because it doesnt take input. I have used the java visualizer demo version that is within Ora8iR2 but it cant work with oracle spatial object model I think this version is designed for. This will "rewind" execution to the entry point of a method, which resets all of its local variables to their original values, but without undoing any changes to object fields or other global state. One other tip: most Java debuggers have an option called something like "Drop to Frame". If you do a Google search for "Java reverse debugger", there are a few alternatives that show up, but they all seem to be either commercial or unmaintained. Unfortunately, it's designed for C/C++ programs, and I don't think you can easily use it to debug Java code that runs inside of a JVM. The Function Visualizer provides a resource that permits the visualization of function calls for any set of Java functions. Mozilla has developed a fancy tool called rr that can enable this kind of debugging by using some fancy techniques to do essentially record incremental snapshots. Without those snapshots, it's impossible to "step backwards" like you want. In most real-world programs, there are so many objects that visualizing them all would be unwieldy, and recording every single state change would be way too inefficient. Unfortunately, this simple approach doesn't really scale to anything except "toy" programs. Follow the steps below to install these plugins. I poked around at the backend code, and it basically works by running your code in a sandboxed JVM, attaching a custom debugger, and recording a snapshot of the stack frame and everything that it references after every line of code. The three plugins are Python Community Edition (this will allow you to run python scripts from inside IntelliJ), Java Visualizer (this will allow you to see visualizations of your code similar to what you might see on python tutor ), and CS 61B (includes among other things a style checker). This tool is intended to help you debug and understand your code, and is integrated into IntelliJ's Java debugger. That's a pretty neat tool that I haven't seen before. This plugin contains a built-in version of the Java Visualizer, a tool similar to Python Tutor which you may have used in CS 61A or other previous courses.
0 Comments
Leave a Reply. |