This debugger provides a launch configurations and support for mixing live and time-travel debugging in Node.js 10+. In addition to the Visual Studio Code debugger logic this extension provides:
- NodeChakraCore binaries with time-travel debugging functionality.
- Launch configuration for mixed live/time-travel debugging.
- The debugger always uses the extension provided NodeChakraCore binaries. If your application depends on a specific version of Node you may encounter unusual behavior.
- Time-Travel mode is not enabled until synchronous module loading has completed and Node is running asynchronous event-loop code.
- A directory called
_ttd_log_
will be created in the project root to hold the time-travel trace files. You may want to add this to your.gitignore
.
The TTD Enabled
launch configuration will launch the application in live
debugging mode where you can debug just as with the regular Node debugger.
However, if you click the step back
button it will configure and launch
an additional reverse execution
debug target which allows you to step back
and reverse continue in your debugger as shown here:
The reverse execution
mode can navigate the program execution from the point
in time where it was launched back to the start of the recording (2-4 seconds
prior). You can switch between live
and reverse
targets using the
multi-target selector drop-down. When you are done with the reverse
mode
you can simply stop it and, if desired later, spawn a new session from the
live
mode at any later point in time.
A launch configuration template providing combined live/step-back
functionality is provided and can be added via the Add Configuration
dialog
as shown here:
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License.