Time Travel to Right Before Error Occurs
sCrypt IDE v0.4.13 lets you launch a debugger that stops right at where sCrypt test fails. This will help developers to locate contract bugs tremendously.
Previously, when a test fails using the sCrypt testing framework, error message only shows where it fails in JavaScript/TypeScript code. If a user has to find out where it fails inside the sCrypt code, he has to print out debug arguments, copy and paste them into launch.json, which is a laborious and error-prone process.
In the latest IDE, when a test fails, there are two additional lines in the error message.
- Go to Source: it shows which line fails inside sCrypt code and also the last opcode executed. Right clicking on the link will take you directly to the offending line.
- Launch Debugger: Right clicking on the link will directly launch a debugger session, based on arguments in the test. The debugger will pause right before the error about to occur, allowing inspection of what caused the failure.
Happy debugging!