This guide helps you resolve common issues with the TON VS Code extension and Language Server in general.
If the extension is not working as expected:
- Make sure you have the latest version of VS Code installed
- Try reloading VS Code (Command Palette >
Developer: Reload Window) - Check the extension is enabled (Extensions view > search for "TON")
- Check if any other Tolk extensions are disabled to avoid conflicts
If you see the error "Tolk standard library is missing! Try installing dependencies with 'yarn/npm install' or specify
ton.tolk.stdlib.path in settings":
-
First, try installing dependencies in your project:
yarn install # or npm install -
If this doesn't help, try set
ton.tolk.stdlib.pathin settings:- Open VS Code Settings
- Search for "Tolk: General › Stdlib Path"
- Set the path to your stdlib directory
-
After making any changes:
- Reload VS Code window (Command Palette >
Developer: Reload Window) - Or restart VS Code completely
- Reload VS Code window (Command Palette >
If you encounter issues with the latest version, you can install a previous version:
- Open Command Palette in VS Code (
Ctrl+Shift+P/Cmd+Shift+P) - Type and select "Extensions: Install Specific Version of Extension..."
- Select "TON" from the list
- Choose the version you want to install from the dropdown
- VS Code will automatically uninstall current version and install the selected one
To prevent automatic updates:
- Open VS Code Settings
- Search for "Extensions: Auto Update"
- Uncheck the option to disable automatic updates
- Or add this to your settings.json:
"extensions.autoUpdate": false
The language server generates logs that can help diagnose issues:
For VS Code extension, logs can be found in:
- Windows:
%USERPROFILE%\.vscode\extensions\ton-core.vscode-ton-[version]\dist\ton-language-server.log - macOS/Linux:
~/.vscode/extensions/ton-core.vscode-ton-[version]/dist/ton-language-server.log
Also, you can view extension logs directly in VS Code:
- Open "View > Output" menu (or press
Ctrl+Shift+U/Cmd+Shift+U) - Select "Tolk" from the dropdown menu in the Output panel
These logs are helpful when reporting issues on GitHub.
If Acton code lenses, formatting, tests, or diagnostics fail because the executable is missing:
-
Make sure the
actoncommand is available in your shell. -
If Acton is installed in a custom location, set:
"ton.acton.path": "/absolute/path/to/acton"
-
Reload VS Code after changing the setting.
If you encounter an issue not covered here:
- Check the GitHub Issues to see if it's already reported
- If not, create a new issue with:
- VS Code version
- Extension version
- Steps to reproduce
- Error messages (if any)
- Logs from the language server (see above)
- Logs from the extension (see above)
- Your project's configuration files
- Ask questions in the TON Group
- Check the TON Documentation