nushell / nushell/nushell

Debug mode for scripts

Open
#4,539 16 comments 13 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

category:enhancement status:needs-design
Dominant language
Rust
Stars
40.5k
Forks
2.3k
Avg merge
1d 19h
Merged PRs (30d)
85

Description

Discussed in https://github.com/nushell/nushell/discussions/4530

Originally posted by cypof February 18, 2022
What would be the best way to run nu scripts in debug mode? E.g. bash can run scripts with settings like this:

# stop and show the stack on any error
set -eE -o functrace
# error on unset variables
set -u
# print each command before executing it
set -x
# extend "set -x" above with source file, line number, function name etc
export PS4='+(${BASH_SOURCE:-""}:${LINENO}) ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
```</div>

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 linked discussion at https://github.com/nushell/nushell/discussions/4530 to understand the proposed debug-mode scope. Define what “done” means for script error handling, unset variables, command tracing, and source-location or function context before identifying the relevant Nushell entry points and tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, shell
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.