Move Trace DebuggingProvides the ability to visualize Move trace files, which can be generated for a given package when running Move tests. These trace files contain information about which Move instructions are executed during a given test run. This extension leverages an implementation of the Debug Adapter Protocol (DAP) that analyzes Move execution traces and presents them to the IDE client (in this case a VSCode extension) in a format that the client understands and can visualize using a familiar debugging interface. Supported featuresCurrently we support trace-debugging of Move unit tests only. and the following trace-debugging features are supported:
Note that support for trace-debugging macros and enums is limited at this point - stepping through macros or code related to enums may result in somewhat unexpected results due to how these constructs are handled internally by the Move execution framework. In particular, variable value tracking may be affected when trace-debugging these constructs. Work is ongoing to improve state-of-the-art - improvement suggestions and bug reports files as issues agains Sui's GitHub repository are greatly appreciated. How to Install
How to trace-debug a Move unit testDebugging a Move unit tests consists of two steps: generating a Move trace and actually trace-debugging it. Generating a Move traceIf you have Mysten's Move extension installed you can generate a Move trace for tests defined in a given file by navigating to this file in VSCode and running If you plan to use the the Trace Debugging Extension by itself, you need to generate the traces using command-line interface of Once the
You can limit trace generation to the tests whose name contains a filter string by passing this string as an additional argument to the trace generation command:
Trace-debugging a testOnce traces are generated, open a Move file containing the test you want to trace-debug and execute |