The WakaTime plugin is open-source on GitHub.
Inside Visual Studio, navigate to Tools → Extensions and Updates…
Click the Online category at the left, then search for wakatime.
Click the Download button, then click Install.
Click the Restart Now button.
Enter your API key , then press enter.
Use Visual Studio like you normally do and your coding activity will be displayed on your WakaTime Dashboard.