Java What Command to Make the Code Go Back Up to the Top Again
Step-back while debugging with IntelliTrace
Take you always stepped while debugging, realized that you've taken one pace too far, and wished you could pace back? Or, while stepping, saw a variable modify in an unexpected way, and wish you lot could go back a stride and run into what its value was earlier? Now you tin, all without having to restart debugging to recreate the state again!
In Visual Studio Enterprise 2017 version 15.v Preview, nosotros are introducing IntelliTrace'southward new "step-back" feature. IntelliTrace at present automatically takes a snapshot of your application on each breakpoint and debugger step you take. This enables you to become dorsum to previous breakpoints or steps and view the country of the application as information technology was in the past.
Let's see it in activity.
Debugging with step-back
First, to enable the feature, go to Tools, Options, IntelliTrace settings, and select the option "IntelliTrace events and snapshots."
IntelliTrace step-dorsum is designed to integrate into your everyday debugging experience.
Every bit y'all're debugging, IntelliTrace records your steps and breakpoint events in the Events tab in the Diagnostic Tools window. When the step-back feature is enabled, it will also accept a snapshot of your application on each debugger step and breakpoint that is hitting. A camera icon will appear adjacent to the events for which a snapshot is available.
Annotation: For performance reasons, snapshots are non taken when you footstep very quickly. If no photographic camera icon appears next to the stride, try varying your stepping speed.
Using the new Step Backward and Forward buttons
Yous tin can use stride-back via the new Step Backward and Step Forward icons in the Debug toolbar. These icons navigate the events in the Events Tab. And so, if you've just taken a pace in alive debugging (F10 or F11), you can use the Pace Astern push to rapidly navigate to the previous footstep. This volition automatically put Visual Studio in Historical debugging mode, at the line of code you've stepped back to. Historical debugging is what we telephone call the view of the application in the past.
In this mode, you'll be able to run across the values of your Phone call Stack, Locals, and Watches, just as you would in regular, live debugging. You can besides evaluate expressions in the Watch Window and hover over variables to see data tips. All these values are populated using the data from the snapshot.
The data IntelliTrace previously recorded for debugger events only captured the variables you'd already expanded in the Locals window at that point in time. However, the information associated with a snapshot contains a view of the unabridged heap, including whatsoever complex objects.
Note: Unlike using Set Next Statement and re-running your code, viewing a snapshot doesn't re-run your code; information technology gives you a static view of the state of the application at a point in time that has occurred in the past.
Y'all can then use the Step Frontward and Pace Backward buttons to navigate between these events in the past. To return to live debugging, you lot can striking Proceed (F5) or the Return to Live Debugging link in the gold bar.
Snapshots tin can also be viewed from the Events tab in the Diagnostic Tools window. To view a snapshot, first select the event y'all're interested in. Then, either click directly on the camera icon, or click the "Activating historical debugging" link on the issue. Once you've done either of these deportment, Visual Studio will exist put in Historical Debugging style at the line of code related to the event you've selected.
From here, you lot'll be able to see the values of your Call Stack, Locals, and Watches, only as y'all would in regular, live debugging. You can also evaluate expressions in the Watch Window and hover over variables to encounter data tips.
With the new IntelliTrace step-dorsum characteristic, you'll be able to speedily stride-back to previous debugger steps and breakpoints and view the land of your application in the past – all without having to restart debugging to reproduce the application state.
Try it out
The IntelliTrace step-dorsum feature is bachelor in Visual Studio Enterprise 2017 version 15.5 Preview, and requires Windows 10 Anniversary Update or in a higher place. The feature is currently supported for WinForms, WPF, Managed Console apps, and Managed Grade Libraries. Back up for debugging ASP.NET applications with IIS Express will be available in an upcoming release of Visual Studio.
Nosotros'd dearest to hear your feedback. To study issues, use the Report a Problem tool in Visual Studio. You'll be able to track your issues in the Visual Studio Developer Community where you can ask questions and find answers. You can also make a product proposition through UserVoice, or e-mail the squad directly at stepback@microsoft.com.
| Deborah Chen, Program Manager, Visual Studio Diagnostics @ChenDeborah Deborah is a program manager on the Visual Studio Diagnostics team, working on IntelliTrace. |
Source: https://devblogs.microsoft.com/visualstudio/step-back-while-debugging-with-intellitrace/
0 Response to "Java What Command to Make the Code Go Back Up to the Top Again"
Post a Comment