Our complete VS Code extension is now available in the Visual Studio Code Marketplace. It’s called Time Travel Debug for C/C++.
The new extension, called Time Travel Debug for C/C++, places superior time travel debugging capabilities at the fingertips of developers using VS Code.
By enabling developers to time-travel forward and backward through code execution flow it:
provides full visibility into the state of code at any point in its execution
makes it much easier to get your head around and understand complex code
accelerates root cause analysis and identification
speeds up bug fixing.
By debugging this way, programmers can conduct effective root cause analysis without needing to predict ahead of time what to log, and avoiding disruptive redeployments.
To work, it requires an existing copy of UDB 6.5 or later, or a trial version of UDB.
But let's skip to the end, what’s actually new?
Here’s a summary of the key capabilities added to VS Code:
Time travel debugging (aka reverse debugging)
Navigate backward and forward through code execution
Reverse Step In/Out/Over join the familiar Step In/Out/Over
Launch, Attach, or Replay a LiveRecorder recording.
Continue and Reverse Continue, stopping at Breakpoints/Conditional Breakpoints/Watchpoints.
Inspect global and local variable values at any point in your program’s execution history.
Timeline - visually navigate and zoom through the execution flow
Bookmarks - set bookmarks at any point in your program’s execution history. These appear on the timeline and can be jumped to
Undo your last navigation action
Evaluate expressions and call functions in the Debug Console at any point in your program’s execution history.
Get the extension
And if you haven’t got a copy of UDB already, you can help yourself to a full featured 60-day free trial.
Join our VS Code User Group
We really appreciate your feedback and new feature suggestions. So join our user group to either ask questions, make suggestions and tell us what you think.
The Visual Studio Code C/C++ extension doesn’t currently support setting data watchpoints from the Watch window (issue #1410). Open the Debug Console panel below the source code editor and type:
-exec watch <variable_name>
to set a data watchpoint on an expression, or
-exec watch -l <variable_name>
to set a data watchpoint on the memory location currently used to store a variable.
Then use the blue navigation buttons in the debugging control panel to run forwards or backwards until the variable’s value or memory location’s contents changes.
Refer to the GDB documentation for details of the watch command.