microsoft / microsoft/WSL

Open and close debug console without restarting WSL

Open
#6,067 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
C++
Stars
33.7k
Forks
1.8k
Avg merge
3d 17h
Merged PRs (30d)
116

Description

Is your feature request related to a problem? Please describe.

The debug console (i.e., that enabled by

[wsl2]
debugConsole=true

in .wslconfig is a very useful feature for debugging assorted kernel-proximal things, but its usefulness is somewhat limited by it being required to be configured to open at WSL startup, and not being openable (or reopenable) thereafter. One of my main uses for it at the moment is live-debugging AppArmor profiles, which I may not know that I am planning to do when I initially start WSL, and which I would prefer not to have to shut down and restart all my WSL distros plus Docker to be able to start doing.

Describe the solution you'd like

I'd like an command, say wsl --debug, which could open and attach the WSL debug console at any time, not just on WSL startup, and whether or not the debug console had been enabled for automatic opening on startup.

Describe alternatives you've considered

I can approximate what I want at the moment with dmesg -w from within WSL, but that's not quite as convenient.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the .wslconfig [wsl2] debugConsole behavior and the wsl --debug command entry point proposed in the issue. Compare this with the existing startup handling and dmesg -w alternative, then define done as opening or attaching the debug console while WSL is running, without restarting distributions or Docker.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.