Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More user-friendly resposnses from byebug executable #256

Closed
pvalena opened this issue May 11, 2016 · 5 comments · Fixed by #258
Closed

More user-friendly resposnses from byebug executable #256

pvalena opened this issue May 11, 2016 · 5 comments · Fixed by #258

Comments

@pvalena
Copy link

pvalena commented May 11, 2016

Hi,

when some fail is raised, it results in output of traceback with the error message in the middle, which is not easily readable for user.

F. e. when no <script.rb> is supplied to byebug executable, then

fail(NoScript, 'You must specify a program to debug...')

returns

/usr/share/gems/gems/byebug-8.2.5/lib/byebug/runner.rb:144:in `setup_cmd_line_args': You must specify a program to debug... (Byebug::Runner::NoScript)
        from /usr/share/gems/gems/byebug-8.2.5/lib/byebug/runner.rb:110:in `run'
        from /usr/share/gems/gems/byebug-8.2.5/bin/byebug:7:in `<top (required)>'
        from /usr/bin/byebug:23:in `load'
        from /usr/bin/byebug:23:in `<main>'

which definitely looks like program issue, not user error.

More user-friendly approach would be f.e.

Error: You must specify a program to debug.

  byebug 8.2.5

  Usage: byebug [options] <script.rb> -- <script.rb parameters>

    -d, --debug               Set $DEBUG=true
    -I, --include list        Add to paths to $LOAD_PATH
    -m, --[no-]post-mortem    Use post-mortem mode
    -q, --[no-]quit           Quit when script finishes
    -x, --[no-]rc             Run byebug initialization file
    -s, --[no-]stop           Stop when script is loaded
    -r, --require file        Require library before script
    -R, --remote [host:]port  Remote debug [host:]port
    -t, --[no-]trace          Turn on line tracing
    -v, --version             Print program version
    -h, --help                Display this message

@deivid-rodriguez
Copy link
Owner

👍

@deivid-rodriguez
Copy link
Owner

@pvalena I fixed this in #258, can you try it?

@deivid-rodriguez
Copy link
Owner

@pvalena Just released 9.0.3 with this changes, let me know what you think.

@pvalena
Copy link
Author

pvalena commented May 16, 2016

@deivid-rodriguez It looks great! Thanks.

@deivid-rodriguez
Copy link
Owner

Welcome! 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants