realgud / realgud-byebug

Emacs realgud plugin for Ruby byebug debugger
5 stars 3 forks source link

Do not know how to do it working #1

Closed anquegi closed 7 years ago

anquegi commented 7 years ago

I'm not sure that this is a bug or not but, I cannot make it working. M-x load-library RET realgud RET => OK M-x load-library RET realgud:byebug RET => OK M-X realgud:byebug run byebug (like this): byebug RET Wrong tyoe argument, string p nil

I have a byebug session allready running

screen shot 2016-12-09 at 09 49 08 screen shot 2016-12-09 at 09 46 49 screen shot 2016-12-09 at 09 46 26

Please, I'm new to realgud so maybe I need some advice on setup this

rocky commented 7 years ago

run byebug (like this): byebug RET

When you invoke byebug like this, at the outset, you need to give a program to debug.

$ byebug
*** You must specify a program to debug

  byebug 9.0.5

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

The message you got:

Wrong type argument, string p nil

is Emacs' funny way of saying (I think) that it expected you to give a name of the program to debug (a string) and instead it got nothing (nil).

I have a byebug session allready running

If the byebug session is run inside an emacs comint shell (M-x shell), then you can have realgud track what's going on in that shell. If the session outside of emacs in a terminal, then not.

To have emacs track this as a shell, run M-x realgud-track-mode and when it prompts you for a debugger name, use byebug

anquegi commented 7 years ago

Thanks, for this advice and short turorial it works pretty well.

screen shot 2016-12-12 at 09 47 13

So it is impossible to debug launching byebug in other terminal and use realgud. but anyway I will use this. thanks

rocky commented 7 years ago

So it is impossible to debug launching byebug in other terminal and use realgud.

Well I don't know byebug that well, but other debuggers including the ones I've written for (older versions of) Ruby, have an ability connection to the debugger via a socket or network port. In gdb the command that does this inside an interactive session is called "gdbserver".

If byebug provides this, then you can run in a terminal and then on the Emacs side connect via a "client side" program.

A couple of other things. If you found the information on how to use in byebug useful, consider putting that information in the realgud-byebug wiki for this project to help others.

The other thing you can do if this is useful is to star the project. I use the ratings to decide which project to work on next when several projects are in need of work which is often the case. Right now, based on ratings, byebug is the least important or used of any project other project.