ActivityWatch / aw-watcher-vscode

Mozilla Public License 2.0
193 stars 27 forks source link

Updated README.md to clarify WSL port forwarding #37

Open gignsky opened 1 year ago

gignsky commented 1 year ago

Ref. #21 #18 #17 #9

I recently installed activity watcher on my windows machine and ran into issues regarding port forwarding when running vscode inside WSL, it turns out that the plugin for vscode was trying to connect to port 5600 on WSL's subnet but not the local subnet of the windows machine running activity watch.

This can be resolved by manually forwarding the port inside each project or by running a shell command to permantly forward the port on WSL's end. I added both solutions to the README.md file in order to save others the trouble of having to figureo out what was going on and why activity watch had no idea that vscode inside WSL was not reporting any data.

I did not look into how to modify the extension itself to auto-forward these ports but other extensions I have are able to do this so I am sure it's possible, just above my level of knowledge.

Thank you for all the work everyone has done in the creation of this extension, I hope my small documentation contribution will prove helpful to others.

gignsky commented 1 year ago

Note: I added an additional commit removing the specification that, for the permanent solution, one should use their WSL IP address in the connectaddress section of the netsh command because binding it to that IP address will cause aw-server to be unable to start due to the port already being bound. If connectaddress=* the issue seems to be resolved.