Support remote files over network drive, ftp, or ssh
See original GitHub issueI’m using an SMB share to work in Windows from a virtual Linux VM. Turned on debugging and looking in the developer console and the log file to see why none of my time is being tracked (I’ve put in line breaks for readability).
VS Code dev console:
[Extension Host] [WakaTime] [DEBUG] Sending heartbeat:
C:\Users\myUser\.vscode\extensions\wakatime.vscode-wakatime-1.2.3\out\python\pythonw
C:\Users\myUser\.vscode\extensions\wakatime.vscode-wakatime-1.2.3\out\wakatime-master\wakatime\cli.py
--file \\192.168.0.10\myShare\myProject\myFile.sh
--plugin "vscode/1.27.2 vscode-wakatime/1.2.3"
--alternate-project myProject
--write
--config C:\Users\myUser\.wakatime.cfg
--logfile C:\Users\myUser\.wakatime.log
.wakatime.log:
{
"now": "2018/10/02 06:53:22 +0200",
"version": "10.3.0",
"plugin": "vscode/1.27.2 vscode-wakatime/1.2.3",
"time": 1538456002.735315,
"caller": "C:\\Users\\myUser\\.vscode\\extensions\\wakatime.vscode-wakatime-1.2.3\\out\\wakatime-master\\wakatime\\main.py",
"lineno": 51,
"is_write": true,
"file": "\\\\192.168.0.10\\myShare\\myProject\\myFile.sh",
"level": "DEBUG",
"message": "File does not exist; ignoring this heartbeat."
}
It seems that it detects that the file does not exist \\192.168.0.10\myShare\myProject\myFile.sh
. But that path does work when entering it into Explorer, so I assume that Wakatime is not able to interpret a network path like Explorer does.
How can I get around this issue? Is there a way to ignore ‘file does not exist’ and track it anyway?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:9 (5 by maintainers)
Top Results From Across the Web
SSHFS: How to Mount Remote File Systems Over SSH
SSHFS mounts a remote file system locally using the secure SSH file ... the menu on the left pane and select the option...
Read more >Which File Transfer Method Is Best for Your Home Network?
SFTP is a better option for transferring files from or to locations outside of your home. But that doesn't mean you must use...
Read more >Mapping Network Drive Over SSH in Windows - Makerlab - HKU
1. Clicks mouse right button on "This PC" in file explorer, selects "Map network drive..." on pop menu.
Read more >NetDrive - The Network Drive for Windows (FTP, SFTP ...
Share your NAS easily with anyone as virtual drive. SFTP to securely transfer files. NetDrive supports secure file transfer by SFTP (SSH File...
Read more >How To Use SFTP to Securely Transfer Files with a Remote ...
SFTP is a secure way to transfer files between local and remote servers. Much more secure than FTP, this protocol uses an SSH...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Happening here as well. Windows 10 x64 1909, vscode 1.45.1, extension version 4.0.0. Weird that it happens also when a remote folder is mapped as network drive 🤔 Here i am accessing the file via
Z:\supersecretfolder\supersecretfile.php
, where Z: is a mapping of the network folder\\192.168.0.222\htdocs
. This is on SMB, in case it’s not clear.EDIT
Little update, apparently, this only happens when accessing paths via their ip addresses instead of their hostname.
To give you the best explaination I can offer, my previous log was on access to the following file paths (both leading to the same result in
"file"
):Z:\supersecretfolder\supersecretfile.php
\\192.168.0.222\htdocs\supersecretfolder\supersecretfile.php
(whereZ:
is mapped as network drive for a shared folder on\\192.168.0.222\htdocs
)When instead i’m editing the same file from the following paths (again, both giving the same result):
Z:\supersecretfolder\supersecretfile.php
\\CFSERVER\htdocs\supersecretfolder\supersecretfile.php
Here, again, Z: is mapped as network folder for
\\CFSERVER\htdocs
, andCFSERVER
is the hostname of the machine located at 192.168.0.222I hope this helps in some way! If you need further clarifications or want me to test something else I’ll do so as soon as I am able to.
Related to wakatime/wakatime#72 and wakatime/wakatime-mode#27.