✍️ TRACE
TRACE is a Visual Studio Code extension that features automatic code edit recommendations, proposed by paper "Learning Project-wise Subsequent Code Edits via Interleaving Neural-based Induction and Tool-based Deduction" by Chenyan Liu, Yun Lin, Yuhuan Huang, Jiaxin Chang, Binhang Qi, Bo Jiang, Zhiyong Huang, and Jin Song Dong. Presented at ASE'25.
If you are interested in the training and inference of the backend models, please refer to TRACE repository.
🚀 UI Demo
[!NOTE]
Please click the image to watch the demo video on YouTube.
🧑💻 Usage
Edit the code, as our extension will automatically record most previous edits.
To Predict Locations:
- Right-click anywhere in the editor and select it in the menu;
- Or use the default keybinding
Ctrl + Alt + L (in MacOS Cmd + Alt + L);
- Or click the short-cut button on top-right corner.
Click the suggested location on the left location tree-view sidebar will automatically generate corresponding edit solutions.
To Generate Edits on other locations, select the code to be edited in the editor, then:
- Right-click and select it in the menu;
- Or use the default keybinding
Ctrl + Alt + E (in MacOS Cmd + Alt + E);
- Or click the short-cut button on top-right corner.
[!NOTE]
To select code for editing, you can:
- Click recommended locations in the left location list;
- Or select part of the code for replacing;
- Or select nothing to generate insertion code at the cursor position.
And by default accepting an edit will trigger another location prediction immediately (you can change this in extension configuration).
Manually Change Edit Description: right-click and select it in the menu. By default the input box will automatically show at query whenever the edit description is empty.
After the model generates possible edits at that range, a difference tab with pop up for you to switch to different edits or edit the code. There are buttons on the top right corner of the difference tab to accept, dismiss or switch among generated edits.
🕹️ Deployments
Deploy as a user
For end-users, simply follow the instructions:
install the extension from the VS Code Marketplace.
Download the backend models and tree-sitter via command:
bash download_models.sh
bash download_treesitter.sh
Set up the environment:
pip install -r requirements.txt
Start backend models via command:
python backend/server.py
Connect extension with your backend at: Settings > Trace: Query URL
The default URL is: http://localhost:5004, update URL for your backend.
Change the default port 5004 at backend/server.ini.
If seeing the following message, you are all set to go:

Deploy as a developer
For debugging, customization purposes, please follow the instructions.
Under directory ./extension, install Node packages:
npm install
Open the project directory in VS Code, press F5, choose Run Extension if you are required to choose a configuration;
A new VS Code window (the "development host") will open with TRACE extension loaded;
You may debug or customize the extension via the development host;
To pack your customized extension, make sure yarn is installed:
npm install -g yarn
npm install -g vsce
Under directory ./extension:
yarn package
The command will generate a .vsix file under ./extension, based on package.json file.
For public usage, you may release it to VS Code extension market
- Please follow the VS Code Extension Marketplace guidelines;
- If you modify and redistribute this extension, please clearly indicate that your version is a fork or modification, and credit this project as the original.
For personal usage, you may open the VS Code command palette (Ctrl + Shift + P / Cmd + Shift + P), then select Extensions: Install from VSIX... and choose the .vsix file generated in the previous step.
❓ Issues
The project is still in development, not fully tested on different platforms.
Welcome to propose issues or contribute to the code.
😄 Enjoy coding!