-
Notifications
You must be signed in to change notification settings - Fork 385
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
After dotnet-trace collect-linux finishes collecting a trace and exits, the terminal cursor remains hidden. The cursor is not restored to its visible state on exit, leaving the user with an invisible cursor in their terminal session.
Steps to Reproduce
- Open a terminal session.
- Run
dotnet-trace collect-linux -p <pid>(or any valid collect-linux invocation). - Wait for trace collection to complete, or stop it with
Ctrl+C/Enter. - Observe that the terminal cursor is no longer visible after the tool exits.
- The terminal is still functional (typing works), but the cursor is invisible.
Expected Behavior
After dotnet-trace collect-linux exits — whether through normal completion, user-initiated stop, or signal — the terminal cursor should be restored to its visible state. The tool should ensure terminal state cleanup happens on all exit paths.
Actual Behavior
The cursor remains hidden after the tool exits. Users must manually restore it by running tput cnorm or reset to get their cursor back.
Additional Context
- The tool likely hides the cursor (e.g., via ANSI escape
\e[?25l) during collection for TUI/progress rendering but does not emit the corresponding show-cursor sequence (\e[?25h) on exit. - The fix should ensure cursor restoration on all exit paths: normal exit,
SIGINT,SIGTERM, and any error/panic paths. - Consider using a cleanup guard or
defer/finallypattern to guarantee terminal state is restored regardless of how the tool exits.
Reactions are currently unavailable
Metadata
Metadata
Labels
bugSomething isn't workingSomething isn't working