Skip to content

krigga/tvm-debugger-example

Repository files navigation

TVM debugger example

This is a blueprint project showcasing how to setup TVM debugger. In order to do that, you need to follow a few simple steps. The first 3 steps are already done in this repo, but if you want to setup TVM debugger in your own projects, you need to do them all.

  1. Use the beta versions of blueprint and sandbox that include the debugger, like so:
"@ton/blueprint": "^0.23.0-debugger.2",
"@ton/sandbox": "^0.21.0-debugger.3",

(put this in your package.json)

  1. In your test file, compile your contracts using the doCompile function with debugInfo parameter, registering the contracts' source maps, like so:
code = registerCompiledContract(await doCompile('Counter', {
    debugInfo: true,
}));

(put this in your .spec.ts file instead of code = await compile('Counter');)

  1. In your test file, enable debugging using either the blockchain.debug global property, or individually on each address (await blockchain.getContract(contract.address)).setDebug(true).

  2. Install the TVM Debugger VS Code extension and launch the test as usual (yarn jest).

  3. Once you get the prompt Please connect using the extension., launch Command Palette in your VS Code (usually it is bound to Ctrl + Shift + P), and choose Debug TON contract (TVM).

  4. Enjoy your debugging session!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published