question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for Windows

See original GitHub issue

I personally don’t have Windows to test and am not familiar with how the chia environment there is setup but can provide guidance on the steps necessary to add such support.

Here are some jumping off points if someone wants to take over:

  • We need a WIndowsLogConsumer that is analogous to the UNIX implementation in FileLogConsumer. It needs to replace the tail -F command with the analogous command for PowerShell.
    • Possibly something like Get-Content <log-file> -Tail <#-of-rows> -Wait
  • Add windows_log_consumer config. See here for an example. It needs to point to default path on Windows where debug.log is stored.
  • The project is using pathlib for handling the file paths. I believe this is compatible with Windows paths but needs to be tested.

I suggest doing a quick test by directly modifying the FileLogConsumer and changing the path in the config to see if there are any other showstoppers to make this work on Windows. That will already be very valuable feedback.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:17 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
skrustevcommented, Apr 26, 2021

Ok I apologize, apparently both of the ways I tried running it using VS Code or Cmder, both had bash console emulators, which support the tail command.

Edit: Using powershell commands works so I could PR it as well. In the meantime you can replace Line 69 with:

f = subprocess.Popen(f"powershell.exe get-content {expanded_user_log_path} -tail 1 -wait", stdout=subprocess.PIPE, stderr=subprocess.PIPE)

3reactions
skrustevcommented, Apr 8, 2021

I was able to successfully run it without any issues on Windows 10 with the latest Python 3.9.4 Windows distribution.

The steps for running it are pretty much the same, only difference is that on Windows , the Python virtual environment is activated by running the ./.venv/Scripts/activate script directly.

  • If you are using VS Code, you can select the created virtual environment by pointing to the ./.venv/Scripts/python.exe and use the Python terminal to run the ChiaDog.

What else I probably had to set differently is the file_path in the config, since on Windows its usually distributed under C:/Users/<username>/.chia/mainnet/log/debug.log for example.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Microsoft Support
Microsoft support is here to help you with Microsoft products. Find how-to articles, videos, and training for Microsoft 365, Windows, Surface, and more....
Read more >
End of support for Windows 7 and Windows 8.1 - Microsoft
After January 10, 2023, Microsoft will no longer provide security updates or technical support for Windows 8.1. You might be able to upgrade...
Read more >
Windows 10 Home and Pro - Microsoft Lifecycle
Microsoft will continue to support at least one Windows 10 release until October 14, 2025. Support dates are shown in the Pacific Time...
Read more >
Support for Windows 10 - Configuration Manager
Learn about the Windows 10 versions that are supported as clients with Configuration Manager.
Read more >
Meet Windows 11: The Newest Windows Version - Microsoft
Meet Windows 11, the newest Windows version from Microsoft. Upgrade your PC to Windows 11, or explore which devices come equipped with its...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found