WakaTime for Visual Studio Code
WakaTime 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 typeinstall
. PickExtensions: Install Extension
. -
Type
wakatime
and hitenter
. -
Enter your api key, then press
enter
.(If youβre not prompted, press
F1
orβ + Shift + P
then typeWakaTime API Key
.) -
Use VSCode and your coding activity will be displayed on your WakaTime dashboard
Usage
Visit https://wakatime.com to see your coding activity.
Configuring
VS Code specific settings are available from β + Shift + P
, then typing wakatime
.
For example, to hide today's coding activity in your status bar:
Press β + Shift + P
then set WakaTime: Status Bar Coding Activity
to false
.
Extension settings are stored in the INI file at $WAKATIME_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 WAKATIME_API_KEY
.
Notes:
$WAKATIME_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 selectingWakaTime: Disable
.
Troubleshooting
First, turn on debug mode:
- Press
F1
orβ + Shift + P
- Type
> WakaTime: Debug
, and pressEnter
. - Select
true
, then pressEnter
.
Next, open your Developer Console to view logs and errors:
Help β Toggle Developer Tools
Errors outside the scope of vscode-wakatime go to $WAKATIME_HOME/.wakatime.log
from wakatime-cli.
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 WakaTime 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 WakaTime 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
wakatime
and hit enter. -
Click the settings icon next to WakaTime, then click Uninstall.
-
Delete the
~/.wakatime*
files in your home directory, unless youβre still using WakaTime 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 [email protected]:wakatime/vscode-wakatime.git
cd vscode-wakatime
npm install
npm run watch
- Install the extension from the marketplace
- Then symlink
~/.vscode/extensions/wakatime.vscode-wakatime-*/dist/extension.js
to./dist/extension.js
Or to run the web version from source:
git clone [email protected]:wakatime/vscode-wakatime.git
cd vscode-wakatime
npm install
npm run compile
npm run open-in-browser
- Go to localhost:3000 in your web browser
Many thanks to all contributors!
Made with