This project has been abandoned in favor of midas, the Visual Studio Code Debug Adapter.
This extension adds functionality for configuring, starting, and interacting with the C/C++ extension while running rr.
We are currently working on another extension that in the end will replace this extension. The development of that extension can be followed at midas on GitHub
- Configuring basic rr settings.
- Snippets for creating a C/C++ extension launch configuration
- Tasks for starting and stopping rr debugging.
- Short-cuts for rr commands.
- Extended UI for rr commands.
To use this extension rr needs to be installed.
This extension provides the following VS Code settings:
rrcfg-tools.hostname
: the hostname where rr is runningrrcfg-tools.port
: the port where rr listensrrcfg-tools.bin
: the full path to the directory of the binary to be debuggedrrcfg-tools.cwd
: the full path to the binary to be debuggedrrcfg-tools.path
: the full path to rrrrcfg-tools.trace-path-pick
: how to select traces
This extension provides the following VS Code commands for rr:
rrcfg-tools.reverse-continue
rrcfg-tools.reverse-step
rrcfg-tools.reverse-next
rrcfg-tools.reverse-finish
all of which map to the corresponding rr.
The extension also provides the following VS Code Commands:
rrcfg-tools.watch
: sets a watchpoint. Whether or not this is a hardware watchpoint or software, depends on your system
This extension provides the following VS Code tasks:
rrcfg-tools: start
: starts rr and begins debugging. Intended to be used as apreLaunchTask
for C/C++ extension.rrcfg-tools: stop
: stops rr and ends debugging. Intended to be used as apostDebugTask
for C/C++ extension.
This extension provides the following VS Code configuratoinSnippet:
rrcfg configuration for cppdbg
: Template for generate a C/C++ extensionlaunch.json
configuration compatible with running rr from this extension.
This extension provides the following default VS Code short-cuts:
Ctrl-F1
: set watchpointCtrl-F5
: reverse-continueCtrl-F10
: reverse-nextCtrl-F11
: reverse-stepCtrl-Shift-F11
: reverse-finish
Like any VS Code command, these can be set to arbitrary keyboard inputs.
Download the latest rrcfg-tools-x.y.z.vsix
from release and install extension from file or install it directly from the Marketplace.
The process of adding rr debugging is streamlined using this extension. The steps are as following:
- Go to the
Run and Debug
view and create alaunch.json
file if there isn't any. If you already have alaunch.json
you can skip this step. - Go to the
launch.json
file in the.vscode
directory and add a configuration by pressingAdd Configuration...
or by pressingCtrl-Space
while having the cursor in the file. Select the configurationrrcfg configuration for cppdbg
. - In the settings for
rrcfg-tools
addWorkspace
settings for all extension settings.hostname
andport
have sane defaults, currently the only valid hostname is 'localhost'.rrcfg-tools.bin
needs to contain the full path to the binary andrrcfg-tools.cwd
needs to contain the full path to the directory where the binary resides.- Optionally configure path to rr if it isn't in
$PATH
. - Optionally configure how to select traces.
- Optionally configure path to rr if it isn't in
- Record something using rr!
- Go to the
Run and Debug
view, from the drop down chooserr
, the pressF5
orStart Debugging
- Depending on how traces are selected, you will either be prompted to write the path to a trace or select one from a list.
- A quick pick drop down will ask for the process to debug.
This will start a debug session using C/C++ extension while running rr but with rr as debugger. The regular UI and short-cuts work as expected, and the extended UI lets you interact with rr as well as the added short-cuts.
Currently these limitations are known:
rrcfg-tools.hostname
actually doesn't do much.- Most likely only works for Linux, but doesn't check that.
- Adding a new
launch.json
and choosingrrcfg configuration for cppdbg
doesn't work.
See the Changelog.