Hackatime for Visual Studio Code
Hackatime is an open source VS Code plugin for metrics, insights, and time tracking automatically generated from your programming activity.
Installation
Press F1 or ⌘ + Shift + P and type install. Pick Extensions: Install Extension.

Type hackatime and hit enter.
Log in with your Hackatime account.
(If you’re not prompted, press F1 or ⌘ + Shift + P then type Hackatime Login.)
Use VSCode and your coding activity will be displayed on your Hackatime dashboard
Usage
Visit https://hackatime.hackclub.com to see your coding activity.
Configuring
VS Code specific settings are available from ⌘ + Shift + P, then typing hackatime.
For example, to hide today's coding activity in your status bar:
Press ⌘ + Shift + P then set Hackatime: Status Bar Coding Activity to false.
Status Bar Alignment
You can customize the position and priority of the Hackatime status bar item:
- Alignment: Set
hackatime.align to left or right to control which side of the status bar shows the Hackatime item
- Priority: Set
hackatime.alignPriority to a number to control the order (higher values appear more to the left)
Both settings require restarting VS Code to take effect.
Extension settings are stored in the INI file at $HOME/.wakatime.cfg.
More information can be found from wakatime-cli.
If using an online IDE like gitpods, add your api key to global ENV key HACKATIME_API_KEY.
Notes:
$HOME defaults to $HOME
- To disable the extension at startup add
disabled=true to your config, this operation can also be performed by pressing ⌘ + Shift + P and selecting Hackatime: Disable.
Troubleshooting
First, turn on debug mode:
- Press
F1 or ⌘ + Shift + P
- Type
> Hackatime: Debug, and press Enter.
- Select
true, then press Enter.
Next, open your Developer Console to view logs and errors:
Help → Toggle Developer Tools
Errors outside the scope of vscode-hackatime go to $HOME/.wakatime/wakatime.log from wakatime-cli.
If your error message contains "won't send heartbeat due to backoff" then delete your ~/.wakatime/wakatime-internal.cfg file to trigger an API connection so we can see the real error message.
The How to Debug Plugins guide shows how to check when coding activity was last received from your editor using the Plugins Status Page.
Microsoft Windows Only: Using Hackatime behind a corporate proxy? Try enabling your Windows Root Certs inside VS Code with the win-ca extension:
Press Ctrl + Shift + X, search for win-ca, press Install.
For more general troubleshooting info, see the wakatime-cli Troubleshooting Section.
SSH configuration
If you're connected to a remote host using the ssh extension you might want to force Hackatime to run locally instead on the server. This configuration is needed when the server you connect is shared among other people. Please follow this guide.
Uninstalling
Click the Extensions sidebar item in VS Code.
Type hackatime and hit enter.
Click the settings icon next to Hackatime, then click Uninstall.
Delete the ~/.wakatime* files in your home directory, unless you’re still using Hackatime with another IDE.
Contributing
Pull requests, bug reports, and feature requests are welcome!
Please search existing issues before creating a new one.
To run from source:
git clone git@github.com:ImShyMike/vscode-hackatime.git
cd vscode-hackatime
npm install
npm run watch
- Install the extension from the marketplace
- Then symlink
~/.vscode/extensions/HackClub.vscode-hackatime-*/dist/extension.js to ./dist/extension.js
Or to run the web version from source:
git clone git@github.com:ImShyMike/vscode-hackatime.git
cd vscode-hackatime
npm install
npm run compile
npm run open-in-browser
- Go to localhost:3000 in your web browser