byebug 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (133) hide show
  1. data/.gitignore +10 -0
  2. data/.travis.yml +8 -0
  3. data/AUTHORS +10 -0
  4. data/CHANGELOG.md +2 -0
  5. data/CONTRIBUTING.md +1 -0
  6. data/Gemfile +3 -0
  7. data/LICENSE +20 -0
  8. data/README.md +5 -0
  9. data/Rakefile +28 -0
  10. data/bin/byebug +395 -0
  11. data/byebug.gemspec +29 -0
  12. data/doc/hanoi.rb +35 -0
  13. data/doc/primes.rb +28 -0
  14. data/doc/rdebug-emacs.texi +1030 -0
  15. data/doc/test-tri2.rb +18 -0
  16. data/doc/tri3.rb +8 -0
  17. data/doc/triangle.rb +12 -0
  18. data/ext/byebug/breakpoint.c +476 -0
  19. data/ext/byebug/byebug.c +512 -0
  20. data/ext/byebug/byebug.h +131 -0
  21. data/ext/byebug/context.c +424 -0
  22. data/ext/byebug/extconf.rb +21 -0
  23. data/ext/byebug/locker.c +53 -0
  24. data/lib/byebug.rb +404 -0
  25. data/lib/byebug/command.rb +232 -0
  26. data/lib/byebug/commands/breakpoints.rb +153 -0
  27. data/lib/byebug/commands/catchpoint.rb +56 -0
  28. data/lib/byebug/commands/condition.rb +49 -0
  29. data/lib/byebug/commands/continue.rb +38 -0
  30. data/lib/byebug/commands/control.rb +110 -0
  31. data/lib/byebug/commands/display.rb +122 -0
  32. data/lib/byebug/commands/edit.rb +48 -0
  33. data/lib/byebug/commands/enable.rb +202 -0
  34. data/lib/byebug/commands/eval.rb +176 -0
  35. data/lib/byebug/commands/finish.rb +43 -0
  36. data/lib/byebug/commands/frame.rb +303 -0
  37. data/lib/byebug/commands/help.rb +56 -0
  38. data/lib/byebug/commands/info.rb +462 -0
  39. data/lib/byebug/commands/irb.rb +123 -0
  40. data/lib/byebug/commands/jump.rb +66 -0
  41. data/lib/byebug/commands/kill.rb +51 -0
  42. data/lib/byebug/commands/list.rb +94 -0
  43. data/lib/byebug/commands/method.rb +84 -0
  44. data/lib/byebug/commands/quit.rb +39 -0
  45. data/lib/byebug/commands/reload.rb +40 -0
  46. data/lib/byebug/commands/save.rb +90 -0
  47. data/lib/byebug/commands/set.rb +210 -0
  48. data/lib/byebug/commands/show.rb +246 -0
  49. data/lib/byebug/commands/skip.rb +35 -0
  50. data/lib/byebug/commands/source.rb +36 -0
  51. data/lib/byebug/commands/stepping.rb +83 -0
  52. data/lib/byebug/commands/threads.rb +189 -0
  53. data/lib/byebug/commands/tmate.rb +36 -0
  54. data/lib/byebug/commands/trace.rb +56 -0
  55. data/lib/byebug/commands/variables.rb +199 -0
  56. data/lib/byebug/context.rb +58 -0
  57. data/lib/byebug/helper.rb +69 -0
  58. data/lib/byebug/interface.rb +223 -0
  59. data/lib/byebug/processor.rb +468 -0
  60. data/lib/byebug/version.rb +3 -0
  61. data/man/rdebug.1 +241 -0
  62. data/test/breakpoints_test.rb +357 -0
  63. data/test/conditions_test.rb +77 -0
  64. data/test/continue_test.rb +44 -0
  65. data/test/display_test.rb +141 -0
  66. data/test/edit_test.rb +56 -0
  67. data/test/eval_test.rb +92 -0
  68. data/test/examples/breakpoint1.rb +15 -0
  69. data/test/examples/breakpoint2.rb +7 -0
  70. data/test/examples/conditions.rb +4 -0
  71. data/test/examples/continue.rb +4 -0
  72. data/test/examples/display.rb +5 -0
  73. data/test/examples/edit.rb +3 -0
  74. data/test/examples/edit2.rb +3 -0
  75. data/test/examples/eval.rb +4 -0
  76. data/test/examples/finish.rb +20 -0
  77. data/test/examples/frame.rb +20 -0
  78. data/test/examples/frame_threads.rb +31 -0
  79. data/test/examples/help.rb +2 -0
  80. data/test/examples/info.rb +38 -0
  81. data/test/examples/info2.rb +3 -0
  82. data/test/examples/info_threads.rb +48 -0
  83. data/test/examples/irb.rb +6 -0
  84. data/test/examples/jump.rb +14 -0
  85. data/test/examples/kill.rb +2 -0
  86. data/test/examples/list.rb +12 -0
  87. data/test/examples/method.rb +15 -0
  88. data/test/examples/post_mortem.rb +19 -0
  89. data/test/examples/quit.rb +2 -0
  90. data/test/examples/reload.rb +6 -0
  91. data/test/examples/restart.rb +6 -0
  92. data/test/examples/save.rb +3 -0
  93. data/test/examples/set.rb +3 -0
  94. data/test/examples/set_annotate.rb +12 -0
  95. data/test/examples/settings.rb +1 -0
  96. data/test/examples/show.rb +2 -0
  97. data/test/examples/source.rb +3 -0
  98. data/test/examples/stepping.rb +21 -0
  99. data/test/examples/thread.rb +32 -0
  100. data/test/examples/tmate.rb +10 -0
  101. data/test/examples/trace.rb +7 -0
  102. data/test/examples/trace_threads.rb +20 -0
  103. data/test/examples/variables.rb +26 -0
  104. data/test/finish_test.rb +48 -0
  105. data/test/frame_test.rb +143 -0
  106. data/test/help_test.rb +50 -0
  107. data/test/info_test.rb +313 -0
  108. data/test/irb_test.rb +81 -0
  109. data/test/jump_test.rb +70 -0
  110. data/test/kill_test.rb +48 -0
  111. data/test/list_test.rb +145 -0
  112. data/test/method_test.rb +70 -0
  113. data/test/post_mortem_test.rb +27 -0
  114. data/test/quit_test.rb +56 -0
  115. data/test/reload_test.rb +44 -0
  116. data/test/restart_test.rb +164 -0
  117. data/test/save_test.rb +92 -0
  118. data/test/set_test.rb +177 -0
  119. data/test/show_test.rb +293 -0
  120. data/test/source_test.rb +45 -0
  121. data/test/stepping_test.rb +130 -0
  122. data/test/support/breakpoint.rb +13 -0
  123. data/test/support/context.rb +14 -0
  124. data/test/support/matchers.rb +67 -0
  125. data/test/support/mocha_extensions.rb +72 -0
  126. data/test/support/processor.rb +7 -0
  127. data/test/support/test_dsl.rb +206 -0
  128. data/test/support/test_interface.rb +68 -0
  129. data/test/test_helper.rb +10 -0
  130. data/test/tmate_test.rb +44 -0
  131. data/test/trace_test.rb +159 -0
  132. data/test/variables_test.rb +119 -0
  133. metadata +265 -0
@@ -0,0 +1,29 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require 'rubygems'
3
+ require File.dirname(__FILE__) + "/lib/byebug/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = %q{byebug}
7
+ s.version = Byebug::VERSION
8
+ s.authors = ["David Rodríguez"]
9
+ s.email = "deivid.rodriguez@mail.com"
10
+ s.homepage = "http://github.com/deivid-rodriguez/byebug"
11
+ s.summary = %q{Ruby 2.0 fast debugger - base + cli}
12
+ s.description = %q{Byebug is a Ruby 2.0 debugger. It's implemented using the
13
+ Ruby 2.0 TracePoint C API. The C extension was forked from debase whereas
14
+ the rest of the gem was forked from debugger. The core component provides
15
+ support that front-ends can build on. It provides breakpoint handling,
16
+ bindings for stack frames among other things.
17
+ }
18
+ s.required_rubygems_version = ">= 1.3.6"
19
+ s.extra_rdoc_files = [ "README.md" ]
20
+ s.files = `git ls-files`.split("\n")
21
+ s.extensions << "ext/byebug/extconf.rb"
22
+ s.executables = ["byebug"]
23
+ s.add_dependency "columnize", ">= 0.3.1"
24
+ s.add_dependency "debugger-linecache", '~> 1.2.0'
25
+ s.add_development_dependency 'rake', '~> 10.0.3'
26
+ s.add_development_dependency 'rake-compiler', '~> 0.8.3'
27
+ s.add_development_dependency 'mocha', '~> 0.13.3'
28
+ s.license = "MIT"
29
+ end
@@ -0,0 +1,35 @@
1
+ #!/usr/bin/ruby
2
+
3
+ def hanoi(n,a,b,c)
4
+ if n-1 > 0
5
+ hanoi(n-1, a, c, b)
6
+ end
7
+ puts "Move disk %s to %s" % [a, b]
8
+ if n-1 > 0
9
+ hanoi(n-1, c, b, a)
10
+ end
11
+ end
12
+
13
+ i_args=ARGV.length
14
+ if i_args > 1
15
+ puts "*** Need number of disks or no parameter"
16
+ exit 1
17
+ end
18
+
19
+ n=3
20
+
21
+ if i_args > 0
22
+ begin
23
+ n = ARGV[0].to_i
24
+ rescue ValueError, msg:
25
+ print "** Expecting an integer, got: %s" % ARGV[0].to_s
26
+ exit 2
27
+ end
28
+ end
29
+
30
+ if n < 1 or n > 100
31
+ puts "*** number of disks should be between 1 and 100"
32
+ exit 2
33
+ end
34
+
35
+ hanoi(n, :a, :b, :c)
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/env ruby
2
+ # Enumerator for primes
3
+ class SievePrime
4
+ @@odd_primes = []
5
+ def self.next_prime(&block)
6
+ candidate = 2
7
+ yield candidate
8
+ not_prime = false
9
+ candidate += 1
10
+ while true do
11
+ @@odd_primes.each do |p|
12
+ not_prime = (0 == (candidate % p))
13
+ break if not_prime
14
+ end
15
+ unless not_prime
16
+ @@odd_primes << candidate
17
+ yield candidate
18
+ end
19
+ candidate += 2
20
+ end
21
+ end
22
+ end
23
+ SievePrime.next_prime do |prime|
24
+ puts prime
25
+ break if prime > 10
26
+ end
27
+
28
+
@@ -0,0 +1,1030 @@
1
+ \input texinfo @c -*-texinfo-*-
2
+ @setfilename rdebug-emacs.info
3
+
4
+ @set DBG ruby-debug
5
+ @set ttrdebug @code{rdebug}
6
+ @set ttDBG @code{@value{DBG}}
7
+ @set Emacs @sc{gnu} Emacs
8
+
9
+ @set RDEBUG_EMACS_VERSION 0.1
10
+ @include version-rdebug-emacs.texi
11
+ @finalout
12
+
13
+ @c Karl Berry informs me that this will add straight quotes in
14
+ @c typewriter text.
15
+ @c See the "Inserting Quote Characters" node in the Texinfo manual
16
+ @set txicodequoteundirected
17
+ @set txicodequotebacktick
18
+
19
+ @c THIS MANUAL REQUIRES TEXINFO 4.0 OR LATER.
20
+
21
+ @c This is a dir.info fragment to support semi-automated addition of
22
+ @c manuals to an info tree.
23
+ @dircategory Programming & development tools.
24
+ @direntry
25
+ * ruby-debug-emacs: (ruby-debug). Ruby Byebug for GNU Emacs
26
+ @end direntry
27
+
28
+ @titlepage
29
+ @title Debugging with @code{ruby-debug} inside GNU Emacs Version @value{RDEBUG_EMACS_VERSION}
30
+ @sp 1
31
+ @subtitle @value{EDITION} Edition
32
+ @subtitle @value{UPDATED-MONTH}
33
+ @author Rocky Bernstein and Anders Lindgren
34
+ @page
35
+ @ifset WHERETO
36
+ @tex
37
+ {\parskip=0pt
38
+ \hfill (Send bugs and comments on ruby-debug to fill in...)\par
39
+ \hfill {\it Debugging with {\tt ruby-debug}\par
40
+ \hfill \TeX{}info \texinfoversion\par
41
+ }
42
+ @end tex
43
+ @end ifset
44
+ @end titlepage
45
+ @page
46
+
47
+ @node Top, Getting started, (dir), (dir)
48
+ @top Debugging with ruby-debug under GNU Emacs
49
+
50
+ @menu
51
+ * Getting started::
52
+ * The Multi-window Mode::
53
+ * Byebug Buffers::
54
+ * Emacs Byebug Commands:: Indexes (nodes containing large menus)
55
+ * Emacs Command Index:: An item for each GNU/Emacs command name.
56
+ * Emacs Function Index:: An item for each Emacs Function.
57
+ * Emacs Key Binding Index:: An item for each Emacs Byebug Command.
58
+
59
+ @detailmenu
60
+ --- The Detailed Node Listing ---
61
+
62
+ Getting started
63
+
64
+ * Installation:: How to install this package
65
+ * Emacs rdebug:: Invoke the ruby byebug initially
66
+ * Emacs shell tracking mode:: Entering rdebug from an existing shell buffer
67
+
68
+ Byebug Buffers
69
+
70
+ * Byebug Command Buffer::
71
+ * Emacs Source:: Commands from the source script
72
+
73
+ Emacs Byebug Commands
74
+
75
+ * Emacs Byebug Common Commands::
76
+ * Emacs Byebug Breakpoint Buffer Commands::
77
+ * Emacs Byebug Stack Buffer Commands::
78
+ * Emacs Byebug Variable Buffer Commands::
79
+ * Emacs Byebug Watch Buffer Commands::
80
+ * Emacs GUD Commands::
81
+
82
+ @end detailmenu
83
+ @end menu
84
+
85
+ This file describes ruby-debug, the Ruby Byebug,
86
+ version @value{RDEBUG_EMACS_VERSION}
87
+
88
+ This is the @value{EDITION} Edition, @value{UPDATED}
89
+ @c Copyright (C) 2007 ...
90
+
91
+ @c @node GNU Emacs
92
+ @c @chapter Using @code{ruby-debug} from GNU Emacs
93
+
94
+
95
+ @cindex @value{Emacs}
96
+ A special interface which comes with Ruby that allows you to use
97
+ @value{Emacs} to view (and edit) the source files for the program you
98
+ are debugging with @value{DBG}. However you must be using at least
99
+ version 21 of @value{Emacs}, but with @value{Emacs} version 22 or 23
100
+ there are even more debugging features available. @code{M-x
101
+ show-emacs-version} inside @value{Emacs} will tell you what version you
102
+ are running.
103
+
104
+ This package provide a full-fledged debugging environment, on par with
105
+ modern integrated development environments. Once the byebug has been
106
+ activated, the Emacs frame is divided into a number of dedicated
107
+ byebug windows.@footnote{If you are an @value{Emacs} traditionalist,
108
+ you can, of course, run this package with only a shell and source
109
+ buffer}
110
+
111
+ This package comes with a number of predefined window layouts. It is
112
+ fully customizable so you can create your own.
113
+
114
+ @c -------------------------------------------------------------------
115
+
116
+
117
+ @node Getting started, The Multi-window Mode, Top, Top
118
+ @chapter Getting started
119
+
120
+ @menu
121
+ * Installation:: How to install this package
122
+ * Emacs rdebug:: Invoke the ruby byebug initially
123
+ * Emacs shell tracking mode:: Entering rdebug from an existing shell buffer
124
+ * Configurating this package:: Introducing the configure system
125
+ @end menu
126
+
127
+ @node Installation, Emacs rdebug, Getting started, Getting started
128
+ @section Installation
129
+
130
+ To use this interface, load the file @code{rdebug.el}. This file is a
131
+ light-weight file, basically it only contains a handful of
132
+ @code{autoload} directives.
133
+
134
+ For example, you can place the following in your @code{~/.emacs} file:
135
+
136
+ @smallexample
137
+ (require 'rdebug)
138
+ @end smallexample
139
+
140
+ In addition, you must have Ruby and ruby-debug installed.
141
+
142
+
143
+ @node Emacs rdebug, Emacs shell tracking mode, Installation, Getting started
144
+ @section Emacs rdebug
145
+
146
+ Use the command @kbd{M-x rdebug} in @sc{gnu} Emacs to start debugging.
147
+ Give the executable file you want to debug as an argument. Make sure
148
+ to use the version that comes with this package as this is newer than
149
+ that supplied with @value{Emacs}.
150
+
151
+ The @kbd{rdebug} command starts @value{DBG} as a subprocess of Emacs,
152
+ with input and output through a newly created Emacs buffer.
153
+
154
+ Using @value{DBG} under Emacs is just like using @value{DBG}
155
+ normally except for two things:
156
+
157
+ @itemize @bullet
158
+ @item
159
+ All ``terminal'' input and output goes through the GNU Emacs buffer.
160
+ @end itemize
161
+
162
+ This applies both to @value{DBG} commands and their output, and to the input
163
+ and output done by the program you are debugging.
164
+
165
+ This is useful because it means that you can copy the text of previous
166
+ commands and input them again; you can even use parts of the output
167
+ in this way.
168
+
169
+ All the facilities of GNU Emacs' Shell mode are available for interacting
170
+ with your script. In particular, you can send signals the usual
171
+ way---for example, @kbd{C-c C-c} for an interrupt, @kbd{C-c C-z} for a
172
+ stop.
173
+
174
+ @node Emacs shell tracking mode, Configurating this package, Emacs rdebug, Getting started
175
+ @section Entering rdebug from an existing shell buffer
176
+
177
+ Many times it's not feasible to enter the byebug from the outset.
178
+ Instead a call to the byebug is put inside the program.
179
+
180
+ @c See @xref{Unit Testing Session}.
181
+
182
+ It is also possible in GNU emacs to use a (``comint'') shell and set a
183
+ mode to watch for @value{DBG} prompts and track the source code in
184
+ another window. @xref{Interactive Shell, , Shell, Emacs, The @value{Emacs}
185
+ Manual}.
186
+
187
+ To enable, this run @kbd{M-x turn-on-rdebug-track-mode}. There is some
188
+ overhead involved in scanning output, so if you are not debugging Ruby
189
+ programs you probably want to turn this off which can be done via the
190
+ @code{M-x turn-off-rdebugtrack} command.
191
+
192
+
193
+ @node Configurating this package, , Emacs shell tracking mode, Getting started
194
+ @section Configurating this package
195
+
196
+ In this manual we present a number of @value{Emacs} lisp variables and
197
+ functions that you can use to configure the byebug interface. In
198
+ addition, you can use the @value{Emacs} @emph{customize} system, see the
199
+ @kbd{<menu-bar> <byebug> <options> <customize>} menu item.
200
+
201
+ @c -------------------------------------------------------------------
202
+
203
+ @node The Multi-window Mode, Byebug Buffers, Getting started, Top
204
+ @chapter Multi-window
205
+
206
+ In the multi-window byebug mode, a number of buffers are visible when
207
+ the byebug starts. This chapter will describe each of them, in
208
+ addition it will describe the features associated with the multi-window
209
+ mode.
210
+
211
+ The default multi-window layout looks like the following:
212
+
213
+ @verbatim
214
+ +----------------------------------------------------------------------+
215
+ | Toolbar |
216
+ +-----------------------------------+----------------------------------+
217
+ | | |
218
+ | Byebug shell | Variables buffer |
219
+ | | |
220
+ +-----------------------------------+----------------------------------+
221
+ | | |
222
+ | Source buffer | Output buffer |
223
+ | | |
224
+ +-----------------------------------+----------------------------------+
225
+ | | |
226
+ | Stack buffer | Breakpoints buffer |
227
+ | | |
228
+ +-----------------------------------+----------------------------------+
229
+ @end verbatim
230
+
231
+ @section Activating Multi-window mode
232
+
233
+ The variable @code{rdebug-many-windows} controls if multi-window mode
234
+ should be used, it is enabled by default. When starting the byebug
235
+ using the @code{M-x rdebug} mode the command line option @code{--emacs
236
+ 3} must be specified (this is also the default).
237
+
238
+ When attaching to an already running byebug process, you must give the
239
+ byebug command @kbd{set annotate 3}.
240
+
241
+ @section Window Layouts
242
+
243
+ When the byebug is started, the original window layout of
244
+ @value{Emacs} is replaced with the window layout of the byebug. You
245
+ can switch back and forth between the original window layout and the
246
+ byebug layout using
247
+ @kbd{M-x rdebug-display-original-window-configuration} and
248
+ @kbd{M-x rdebug-display-byebug-window-configuration}.
249
+
250
+ If, for some reason, the byebug layout has been garbled you can
251
+ restore it to the original state using @kbd{M-x
252
+ rdebug-restore-byebug-window-layout}.
253
+
254
+ The byebug provides a number of different window layouts. The easies
255
+ way to try them out is to use the menu @kbd{<menu-bar> <byebug>
256
+ <layout>} and select any in the section starting with @code{Standard}.
257
+
258
+
259
+ @section The buffers
260
+
261
+ All buffers in this section share a set of commands for common byebug
262
+ operations and for switching between buffers. In addition, each buffer
263
+ has got a set of dedicated commands.
264
+
265
+ All byebug buffers, with the exception of source and the byebug
266
+ shell window, are called @emph{secondary buffers}.
267
+
268
+ @subsection Keybindings for all Byebug Windows
269
+
270
+ The byebug provides key-bindings that work in all byebug windows,
271
+ including Ruby source buffers. The key bindings are designed to match
272
+ keys of commonly used byebug environments.
273
+
274
+ The variable @code{rdebug-populate-common-keys-function} can be assigned
275
+ to a function that should bind the keys use. Three functions are
276
+ provided @code{rdebug-populate-common-keys-standard},
277
+ @code{...-eclipse}, and @code{...-netbeans}.
278
+
279
+ @multitable @columnfractions 0.4 0.2 0.2 0.2
280
+ @headitem Command @tab Standard @tab Eclipse @tab Netbeans
281
+ @item Run @tab f5 @tab @tab
282
+ @item Quit @tab S-f5 @tab @tab
283
+ @item Toggle Breakpoint @tab f9 @tab @tab
284
+ @item Enable/Disable Breakpoint @tab C-f9 @tab S-C-b @tab S-f8
285
+ @item Step over @tab f10 @tab f6 @tab f8
286
+ @item Step into @tab f11 @tab f5 @tab f7
287
+ @item Step out @tab S-f11 @tab f7 @tab M-S-f7
288
+
289
+ @end multitable
290
+
291
+
292
+
293
+ @subsection Keybindings for Secondary Buffers
294
+
295
+ The following commands are available in all secondary windows.
296
+
297
+ Capital letters move between secondary buffers as mentioned above (jump
298
+ to if visible or replace a secondary if not).
299
+
300
+ @table @kbd
301
+ @item SPACE
302
+ step (edebug compatible)
303
+ @item <
304
+ Up in the stack trace
305
+ @item >
306
+ Down in the stack trace
307
+ @item ?
308
+ Help
309
+ @item B
310
+ Display breakpoints buffer
311
+ @item C
312
+ Display command buffer
313
+ @item O
314
+ Display program output
315
+ @item S
316
+ Display source window
317
+ @item T
318
+ Display stack trace buffer
319
+ @item V
320
+ display variables buffer
321
+ @item W
322
+ display watch buffer
323
+ @item b
324
+ Set breakpoint
325
+ @item c
326
+ Continue (i.e. run)
327
+ @item d
328
+ Remove breakpoint
329
+ @item f
330
+ Finish (i.e. step out of the current function)
331
+ @item n
332
+ Next (i.e. step into function)
333
+ @item p
334
+ print
335
+ @item q
336
+ Quit
337
+ @item r
338
+ Restart
339
+ @item s
340
+ Step (i.e. step over function)
341
+ @end table
342
+
343
+ You can use the same commands in the source buffer if you enable
344
+ @code{rdebug-short-key-mode}. The best way to do this is to add the
345
+ following to your init file:
346
+
347
+ @smallexample
348
+ (add-hook 'rdebug-mode-hook 'rdebug-turn-on-short-key-mode)
349
+ @end smallexample
350
+
351
+
352
+
353
+ @subsection The Byebug Shell Buffer
354
+
355
+ The @emph{byebug shell window} is the main communication channel
356
+ between @value{DBG} and @value{Emacs}. You can use the shell to issue
357
+ byebug commands directly. In addition, any @value{Emacs} byebug
358
+ command you issue will be translated into shell commands, and the output
359
+ will be parsed.
360
+
361
+ It is the ambition that the @value{Emacs} byebug interface should be
362
+ in a state where the byebug shell window would not need to be visible.
363
+
364
+ @subsection The Source Buffer
365
+
366
+ The @emph{source buffers} (or buffers) contains the actual Ruby source
367
+ code that is being debugged. A small arrow in the left fringe displays
368
+ the current line. Active breakpoints are displayed as red dots and
369
+ passive as grey.
370
+
371
+ @subsection The Output Buffer
372
+
373
+ The @emph{output buffer} displays any output the debugged program emits.
374
+
375
+ The option @code{rdebug-use-separate-io-buffer} controls if the output
376
+ buffer should be used, or if the output would go into the byebug shell
377
+ buffer.
378
+
379
+ @subsection The Variables Buffer
380
+
381
+ In this buffer, local and object variables are displayed. The values of
382
+ the variables can be edited.
383
+
384
+ @table @kbd
385
+ @item RET
386
+ Edit the value
387
+ @item e
388
+ Print the value
389
+ @item x
390
+ Pretty-print the value
391
+ @end table
392
+
393
+ @subsection The Stack Trace Buffer
394
+
395
+ The @emph{stack trace} buffer displays the function that is currently
396
+ being byebug, the function that called it, etc., all the way up to the
397
+ originally called function.
398
+
399
+ You can navigate in the stack trace buffer in order to see the source of
400
+ any function in the call chain. The Variables buffer will also be
401
+ updated to reflect the local variables of that function.
402
+
403
+ @table @kbd
404
+ @item RET
405
+ Select a function to display
406
+ @item <digits>
407
+ Go to a stack frame
408
+ @end table
409
+
410
+ @subsection The Watch Buffer
411
+
412
+ The @emph{Watch Buffer} can display arbitrary expressions, including,
413
+ but not limited to, global variables.
414
+
415
+ @table @kbd
416
+ @item a
417
+ Add a watch expression
418
+ @item C-d, d
419
+ Delete a watch expression
420
+ @item RET, e
421
+ Edit a watch expression
422
+ @item <digits>
423
+ Go to the expression
424
+ @end table
425
+
426
+ @subsection The Breakpoints Buffer
427
+
428
+ The @emph{Breakpoints Buffer} displays all breakpoints that currently are
429
+ defined and shows if they are enabled or disabled.
430
+
431
+ @table @kbd
432
+ @item t
433
+ Toggle a breakpoint between enabled and disabled
434
+ @item i
435
+ Add a breakpoint condition
436
+ @item ret
437
+ Goto a breakpoint
438
+ @item C-d
439
+ Delete a breakpoint
440
+ @item <digits>
441
+ Go to the expression
442
+ @end table
443
+
444
+ @subsection The Help Buffer
445
+
446
+ The @emph{Help Buffer} is displayed whenever you press @code{?}. It will
447
+ display a help text on the available byebug commands and commands to
448
+ navigate between the buffers.
449
+
450
+
451
+ @c -------------------------------------------------------------------
452
+
453
+ @node Byebug Buffers, Emacs Byebug Commands, The Multi-window Mode, Top
454
+ @chapter Byebug Buffers
455
+
456
+ @menu
457
+ * Byebug Command Buffer::
458
+ * Emacs Source:: Commands from the source script
459
+ @end menu
460
+
461
+ @node Byebug Command Buffer, Emacs Source, Byebug Buffers, Byebug Buffers
462
+ @section Emacs Byebug Command buffer
463
+
464
+ Each time @value{DBG} displays a stack frame, Emacs automatically finds the
465
+ source file for that frame and puts an arrow (@samp{=>}) at the
466
+ left margin of the current line. Emacs uses a separate buffer for
467
+ source display, and splits the screen to show both your @value{DBG} session
468
+ and the source.
469
+
470
+ Explicit @value{DBG} @code{list} or search commands still produce output as
471
+ usual, but you probably have no reason to use them from GNU Emacs.
472
+
473
+ @quotation
474
+ @emph{Warning:} If the directory where your script resides is not your
475
+ current directory, it can be easy to confuse Emacs about the location of
476
+ the source files, in which case the auxiliary display buffer does not
477
+ appear to show your source. @value{DBG} can find programs by searching your
478
+ environment's @code{PATH} variable, so the @value{DBG} input and output
479
+ session proceeds normally; but Emacs does not get enough information
480
+ back from @value{DBG} to locate the source files in this situation. To
481
+ avoid this problem, either start @value{DBG} mode from the directory where
482
+ your script resides, or specify an absolute file name when prompted for the
483
+ @kbd{M-x gdb} argument.
484
+
485
+ A similar confusion can result if you use the @value{DBG} @code{file} command to
486
+ switch to debugging a program in some other location, from an existing
487
+ @value{DBG} buffer in Emacs.
488
+ @end quotation
489
+
490
+ @noindent
491
+ (preceded by @kbd{M-:} or @kbd{ESC :}, or typed in the @code{*scratch*} buffer, or
492
+ in your @file{.emacs} file).
493
+
494
+ In the @value{DBG} I/O buffer, you can use the Emacs commands listed
495
+ below in addition to the standard Shell mode commands. The I/O buffer
496
+ name name is usually @code{*gud-}@emph{script-name}@code{*}, where
497
+ @emph{script-name} is the name of the script you are debugging.
498
+
499
+ Many of the commands listed below are also bound to a second key
500
+ sequence which also can be used in the also be used in the source
501
+ script. These are listed in @ref{Emacs Source}.
502
+
503
+ In secondary buffers many commands are available the corresponding
504
+ final keystroke. For example @code{C-c n} in a secondary buffer is
505
+ @code{n}.
506
+
507
+ @table @kbd
508
+ @item C-h m
509
+ Describe the features of Emacs' @value{DBG} Mode.
510
+
511
+ @item C-x C-a C-b (gud-break)
512
+ @pindex C-x C-a C-b (gud-break)
513
+ Set breakpoint at current line.
514
+
515
+ @item C-x C-a C-d (gud-remove)
516
+ @pindex C-x C-a C-d (gud-remove)
517
+ Remove breakpoint at current line.
518
+
519
+ @item C-x C-a C-l (gud-refresh)
520
+ @pindex C-x C-a C-d (gud-refresh)
521
+ Fix up a possibly garbled display, and redraw the arrow.
522
+
523
+ @item C-c RET (comint-copy-old-input)
524
+ @pindex C-c RET (comint-copy-old-input)
525
+ Insert after prompt old input at point as new input to be edited.
526
+ Calls `comint-get-old-input' to get old input.
527
+
528
+ @item C-c n (gud-next)
529
+ @pindex C-c n (gud-next)
530
+ Step one line, skipping functions. (Step over).
531
+
532
+ @item C-x C-a C-o (comint-delete-output)
533
+ @pindex C-c n (comint-delete-output)
534
+ Delete all output from interpreter since last input. Does not delete
535
+ the prompt.
536
+
537
+ @item C-x C-a C-r (gud-cont)
538
+
539
+ @item C-c SPC (gud-step @var{arg})
540
+ @pindex C-c SPC (gud-step @var{arg})
541
+ @itemx C-x C-a C-s (gud-step @var{arg})
542
+ @pindex C-x C-a C-s (gud-step @var{arg})
543
+ Step one source line. Same as @value{DBG} @code{step} command. The
544
+ @value{Emacs} command name is @code{gud-step} and @code{C-x C-a C-s}
545
+ is an alternate binding which can be used in the source
546
+ script.
547
+ @c @xref{Step}.
548
+
549
+ With a numeric argument, run that many times.
550
+ @xref{Arguments, , Numeric Arguments, Emacs, The @value{Emacs}
551
+ Manual}.
552
+
553
+
554
+ @item C-x C-a C-t (gud-tbreak @var{arg})
555
+ Set temporary breakpoint at current line.
556
+
557
+ @item C-x C-a C-w (backward-kill-word)
558
+ @item C-x C-a C-x (comint-get-next-from-history)
559
+ @item C-x C-a C-z (comint-stop-subjob)
560
+ Stop the current subjob.
561
+ This command also kills the pending input
562
+ between the process mark and point.
563
+
564
+ WARNING: if there is no current subjob, you can end up suspending
565
+ the top-level process running in the buffer. If you accidentally do
566
+ this, use M-x comint-continue-subjob to resume the process. (This
567
+ is not a problem with most shells, since they ignore this signal.)
568
+
569
+ @item C-x C-a C-\ (comint-quit-subjob)
570
+ Send quit signal to the current subjob.
571
+ This command also kills the pending input
572
+ between the process mark and point.
573
+
574
+ @item C-c + (gud-step-plus)
575
+ Run @code{step+}.
576
+
577
+ @item C-c . (comint-insert-previous-argument @var{index})
578
+ Insert the @emph{index-th} argument from the previous Comint command-line at point.
579
+ Spaces are added at beginning and/or end of the inserted string if
580
+ necessary to ensure that it's separated from adjacent arguments.
581
+ Interactively, if no prefix argument is given, the last argument is inserted.
582
+ Repeated interactive invocations will cycle through the same argument
583
+ from progressively earlier commands (using the value of index specified
584
+ with the first command).
585
+
586
+ @item C-c < (gud-up)
587
+ Go up a stack frame. With a numeric argument, go up that many
588
+ stack frames. Same @value{DBG} @code{up} command.
589
+ @xref{Arguments, , Numeric Arguments, Emacs, The @value{Emacs}
590
+ Manual}.
591
+
592
+ @item C-c > (gud-down)
593
+ Go down a stack frame. Same as @value{DBG} @code{down}.
594
+ With a numeric argument, go down that many stack frames.
595
+ @xref{Arguments, , Numeric Arguments, Emacs, The @value{Emacs}
596
+ Manual}.
597
+
598
+ @item C-c ? (rdebug-display-secondary-window-help-buffer)
599
+ Display the rdebug help buffer.
600
+
601
+ @item C-c B (rdebug-display-breakpoints-buffer)
602
+ Display the rdebug breakpoints buffer.
603
+
604
+ @item C-x C-a C (rdebug-display-cmd-buffer)
605
+ Display the rdebug command buffer.
606
+
607
+ @item C-c O (rdebug-display-output-buffer)
608
+ Display the rdebug output buffer.
609
+
610
+ @item C-c R (gud-run)
611
+ @itemx C-c r (gud run)
612
+ Restart or run the script. Same as @value{DBG} @code{run} command.
613
+
614
+ @item C-c S (gud-source-resync)
615
+ @item C-c T (rdebug-display-stack-buffer)
616
+ Display the rdebug stack buffer.
617
+ @item C-c V (rdebug-display-variables-buffer)
618
+ Display the rdebug variables buffer.
619
+
620
+ @item C-c W (rdebug-display-watch-buffer)
621
+ Display the rdebug watch buffer.
622
+
623
+ @item C-c f (gud-finish @var{arg})
624
+ @pindex C-c f (gud-finish @var{arg})
625
+ Finish executing current function.
626
+
627
+ @itemx C-x C-a C-f (gud-finish)
628
+ @pindex C-x C-a C-f (gud-finish)
629
+ Finish executing current function. The same as @value{DBG}
630
+ @code{finish} command.
631
+ @c @xref{Finish}.
632
+
633
+ @item C-c n (gud-next)
634
+ @pindex C-c n (gud-next)
635
+ Execute to next source line in this function, skipping all function
636
+ calls. Same as @value{DBG} @code{next} command.
637
+ @c @xref{Next}.
638
+
639
+ With a numeric argument, run that many times.
640
+ @c @xref{Arguments, , Numeric Arguments, Emacs, The @value{Emacs} Manual}.
641
+
642
+ @item C-c q (gud-quit)
643
+
644
+ @item C-x C-a C-l
645
+ Resynchronize the current position with the source window. The
646
+ @value{Emacs} command name is @code{gud-refresh} and @code{C-x C-a
647
+ C-l} is an alternate binding which also can be used in the source script.
648
+
649
+ @item C-c a
650
+ Shows argument variables (e.g.@: @code{$1}, @code{$2}) of the current
651
+ stack frame. Same as @value{DBG} @code{info args} command. The
652
+ @value{Emacs} command name is @code{gud-args} and @code{C-x C-a a} is
653
+ an alternate binding which also can be used in the source script.
654
+
655
+ @item C-c T
656
+ Show stack trace. Same as @value{DBG} @code{where} command. The
657
+ @value{Emacs} command name is @code{gud-where} and @code{C-x C-a T} is
658
+ an alternate binding which can be used in the source
659
+ script.
660
+ @c @xref{Backtrace}.
661
+
662
+ @end table
663
+
664
+ In any source file, the Emacs command @kbd{C-x SPC} (@code{gud-break})
665
+ tells @value{DBG} to set a breakpoint on the source line point is on.
666
+
667
+ If you accidentally delete the source-display buffer, an easy way to get
668
+ it back is to type the command @code{frame} in the @value{DBG} buffer, to
669
+ request a frame display; when you run under Emacs, this recreates
670
+ the source buffer if necessary to show you the context of the current
671
+ frame.
672
+
673
+ The source files displayed in Emacs are in ordinary Emacs buffers
674
+ which are visiting the source files in the usual way. You can edit
675
+ the files with these buffers if you wish; but keep in mind that @value{DBG}
676
+ communicates with Emacs in terms of line numbers. If you add or
677
+ delete lines from the text, the line numbers that @value{DBG} knows cease
678
+ to correspond properly with the code.
679
+
680
+ @xref{Byebug Operation, , , Emacs, The @value{Emacs}
681
+ Manual}.
682
+
683
+ @node Emacs Source, , Byebug Command Buffer, Byebug Buffers
684
+ @section Commands from the source script
685
+
686
+ @table @kbd
687
+ @item C-x SPC
688
+
689
+ tells @value{DBG} to set a breakpoint on the source
690
+ line point is on. (@code{gud-break})
691
+
692
+ @item C-x C-a t
693
+
694
+ @code{gud-linetrace}
695
+
696
+ @item C-x C-a C-f
697
+ Restart or run the script. Same as @value{DBG} @code{run} command. The
698
+ @value{Emacs} command name is @code{gud-finish}. In the corresponding
699
+ I/O buffer, @code{C-c R} is an alternate binding.
700
+
701
+ @item C-x C-a T
702
+ Show stack trace. Same as @value{DBG} @code{where} command. In the
703
+ corresponding I/O buffer, @code{C-c T} is an alternate
704
+ binding.
705
+ @c @xref{Backtrace}.
706
+
707
+ @item C-x C-a <
708
+
709
+ Go up a stack frame. With a numeric argument, go up that many
710
+ stack frames. Same @value{DBG} @code{up} command.
711
+ @xref{Arguments, , Numeric Arguments, Emacs, The @value{Emacs} Manual}.
712
+
713
+ The @value{Emacs} command name is @code{gud-up}. In the corresponding
714
+ I/O buffer, @code{C-c <} is an alternate binding.
715
+
716
+ @item C-x C-a >
717
+
718
+ Go down a stack frame. Same as @value{DBG} @code{down}.
719
+ With a numeric argument, go down that many stack frames.
720
+ @xref{Arguments, , Numeric Arguments, Emacs, The @value{Emacs}
721
+ Manual}.
722
+
723
+ The @value{Emacs} command name is @code{gud-down}. In the
724
+ corresponding I/O buffer, @code{C-c >} is an alternate binding.
725
+
726
+ @item C-x C-a C-t
727
+
728
+ @code{gud-tbreak}
729
+
730
+ @item C-x C-a C-s
731
+
732
+ Step one source line. Same as @value{DBG} @code{step}
733
+ command.
734
+ @c @xref{Step}.
735
+
736
+ With a numeric argument, run that many times.
737
+ @xref{Arguments, , Numeric Arguments, Emacs, The @value{Emacs}
738
+ Manual}.
739
+
740
+ The @value{Emacs} command name is @code{gud-step}. In the
741
+ corresponding I/O buffer, @code{C-x C-a C-s} is an alternate binding.
742
+
743
+ @item C-x C-a C-e
744
+
745
+ @code{gud-statement}
746
+
747
+ @item C-x C-a R
748
+ Restart or run the script. Same as @value{DBG} @code{run} command. The
749
+ @value{Emacs} command name is @code{gud-run}. In the corresponding I/O
750
+ buffer, @code{C-c R} is an alternate binding.
751
+
752
+ @item C-x C-a C-d
753
+ Delete breakpoint. @code{gud-remove}
754
+
755
+ @item C-x C-a C-p
756
+
757
+ @code{gud-print}
758
+
759
+ @item C-x C-a C-n
760
+
761
+ Execute to next source line in this function, skipping all function
762
+ calls. Same as @value{DBG} @code{next} command. With a numeric
763
+ argument, run that many times. @xref{Arguments, , Numeric Arguments,
764
+ Emacs, The @value{Emacs} Manual}.
765
+
766
+ The @value{Emacs} command name is @code{gud-next}. In the
767
+ corresponding I/O buffer, @code{C-x C-a C-n} is an alternate binding.
768
+
769
+ @item C-x C-a f C-f
770
+
771
+ @code{gud-finish}
772
+
773
+ @item C-x C-a C-r
774
+ Continue execution of your script Same as @value{DBG} @code{continue}
775
+ command. The @value{Emacs} command name is @code{gud-cont}. In the
776
+ corresponding I/O buffer, @code{C-x C-a C-r} is an alternate binding.
777
+ @c See @ref{Continue}.
778
+
779
+ @item C-x C-a C-b
780
+
781
+ @code{gud-break}
782
+
783
+ @item C-x C-a a
784
+
785
+ @code{gud-args}
786
+ Shows argument variables (e.g.@: @code{$1}, @code{$2}) of the current
787
+ stack frame. Same as @value{DBG} @code{info args} command. The
788
+ @value{Emacs} command name is @code{gud-args}. In the corresponding
789
+ I/O buffer, @code{C-c a} is an alternate binding which also can be
790
+ used in the source script.
791
+
792
+ @item C-x C-a C-l
793
+ Move to current position in this source window. The @value{Emacs}
794
+ command name is @code{gud-refresh}. In the corresponding I/O buffer,
795
+ @code{C-x C-a C-l} is an alternate binding.
796
+
797
+ @end table
798
+
799
+ @node Emacs Byebug Commands, Emacs Command Index, Byebug Buffers, Top
800
+ @chapter Emacs Byebug Commands
801
+
802
+ @menu
803
+ * Emacs Byebug Common Commands::
804
+ * Emacs Byebug Breakpoint Buffer Commands::
805
+ * Emacs Byebug Stack Buffer Commands::
806
+ * Emacs Byebug Variable Buffer Commands::
807
+ * Emacs Byebug Watch Buffer Commands::
808
+ * Emacs GUD Commands::
809
+ @end menu
810
+
811
+ @node Emacs Byebug Common Commands, Emacs Byebug Breakpoint Buffer Commands, Emacs Byebug Commands, Emacs Byebug Commands
812
+ @section Emacs Byebug Common Commands
813
+
814
+ The commands in this section are used to make a secondary buffer
815
+ visible. If the buffer doesn't exist, nothing is done.
816
+ The way the buffer is made visible is follows the following
817
+ rules tried in order:
818
+
819
+ @enumerate
820
+ @item
821
+ If the buffer doesn't exist, do nothing.
822
+ @item
823
+ If the buffer is already displayed, switch to it.
824
+ @item
825
+ If the current buffer is a
826
+ secondary buffer, bury it replacing with the requested
827
+ buffer.
828
+ @item
829
+ If there is secondary buffer visible, that
830
+ is replaced instead.
831
+ @item
832
+ Just pick a visible buffer to bury and replace.
833
+ @end enumerate
834
+
835
+ The commands are also have key bindings that end in an uppercase
836
+ letter. This letter is given in parenthesis. When in one of the
837
+ secondary buffers, the uppercase letter is bound to the command as well.
838
+
839
+ @table @kbd
840
+
841
+ @item (rdebug-display-breakpoints-buffer) (@kbd{B})
842
+ @findex rdebug-display-breakpoints-buffer (@kbd{B})
843
+ Display the rdebug breakpoints buffer. Bound to: @kbd{C-x C-a B},
844
+ @kbd{<menu-bar> <byebug> <view> <breakpoints>}. Secondary buffers:
845
+ @kbd{O}.
846
+
847
+ @item (rdebug-display-cmd-buffer) (@kbd{C})
848
+ @findex rdebug-display-cmd-buffer (@kbd{C})
849
+ Display the byebug command buffer.
850
+
851
+ Bound to: @kbd{C-x C-a C}, @kbd{<menu-bar> <byebug> <view> <shell>}.
852
+
853
+ @item (rdebug-display-output-buffer) (@kbd{O})
854
+ @findex rdebug-display-output-buffer (@kbd{?})
855
+ Display the byebug output buffer.
856
+
857
+ Bound to: @kbd{C-x C-a O}, @kbd{<menu-bar> <byebug> <view>
858
+ <output>}. Secondary buffers: @kbd{O}.
859
+
860
+ @item (rdebug-display-secondary-window-help-buffer) (@kbd{?})
861
+ @findex rdebug-display-secondary-window-help-buffer (@kbd{?})
862
+
863
+ @item (rdebug-display-stack-buffer) (@kbd{T})
864
+ @findex rdebug-display-stack-buffer (@kbd{T})
865
+ Display the byebug stack buffer. Bound to: @kbd{C-x C-a T},
866
+ @kbd{<menu-bar> <byebug> <view> <stack>}. Secondary buffers: @kbd{T}.
867
+
868
+ @item (rdebug-display-variables-buffer) (@kbd{V})
869
+ @findex rdebug-display-variables-buffer (@kbd{V})
870
+ Display the byebug variables buffer. Bound to: @kbd{C-x C-a V},
871
+ @kbd{<menu-bar> <byebug> <view> <variables>}. Secondary buffers:
872
+ @kbd{V}.
873
+
874
+ @item (rdebug-display-watch-buffer) (@kbd{W})
875
+ @findex rdebug-display-watch-buffer (@kbd{W})
876
+ Display the byebug variables buffer. Bound to: @kbd{C-x C-a W},
877
+ @kbd{<menu-bar> <byebug> <view> <watch>}. Secondary buffers: @kbd{V}.
878
+
879
+ @item (rdebug-display-byebug-window-configuration)
880
+ @findex rdebug-display-byebug-window-configuration
881
+ Display the current layout of windows of the rdebug Ruby byebug.
882
+ @item (rdebug-display-original-window-configuration)
883
+ @findex rdebug-display-original-window-configuration
884
+ Display the layout of windows prior to starting the rdebug Ruby
885
+ byebug. This function is called upon quitting the byebug and
886
+ @var{rdebug-many-windows} is not nil.
887
+ @item (rdebug-goto-entry-n)
888
+ @findex rdebug-goto-entry-n
889
+ Breakpoints, Display expressions and Stack Frames all have
890
+ numbers associated with them which are distinct from line
891
+ numbers. In a secondary buffer, this function is usually bound to
892
+ a numeric key. which will position you at that entry number. To
893
+ go to an entry above 9, just keep entering the number. For
894
+ example, if you press 1 and then 9, you should jump to entry
895
+ 1 (if it exists) and then 19 (if that exists). Entering any
896
+ non-digit will start entry number from the beginning again.
897
+ @item (rdebug-quit) - q
898
+ @findex rdebug-quit (q)
899
+ Kill the byebug process associated with the buffer.
900
+
901
+ When @var{rdebug-many-windows} is active, the original window layout is
902
+ restored.
903
+ @item (rdebug-restore-windows)
904
+ @findex rdebug-restore-windows
905
+ Display the initial ruby byebug window layout.
906
+
907
+ @end table
908
+
909
+
910
+ @node Emacs Byebug Breakpoint Buffer Commands, Emacs Byebug Stack Buffer Commands, Emacs Byebug Common Commands, Emacs Byebug Commands
911
+ @section Emacs Byebug Breakpoint Buffer Commands
912
+
913
+ @table @kbd
914
+ @item (rdebug-goto-breakpoint)
915
+ @findex rdebug-goto-breakpoint
916
+ @item (rdebug-goto-breakpoint-mouse)
917
+ @findex rdebug-goto-breakpoint-mouse
918
+ @item (rdebug-breakpoints-mode)
919
+ @findex rdebug-breakpoints-mode
920
+ Major mode for displaying breakpoints in a secondary window. Uses
921
+ @var{rdebug-breakpoints-mode-map}.
922
+ @end table
923
+
924
+ @node Emacs Byebug Stack Buffer Commands, Emacs Byebug Variable Buffer Commands, Emacs Byebug Breakpoint Buffer Commands, Emacs Byebug Commands
925
+ @section Emacs Byebug Stack Buffer Commands
926
+
927
+ @table @kbd
928
+ @item (rdebug-goto-stack-frame)
929
+ @findex rdebug-goto-stack-frame
930
+ @item (rdebug-frames-mode)
931
+ @findex rdebug-frames-mode
932
+ Major mode for displaying the stack trace. Uses
933
+ @var{rdebug-frames-mode-map}.
934
+ @end table
935
+
936
+ @node Emacs Byebug Variable Buffer Commands, Emacs Byebug Watch Buffer Commands, Emacs Byebug Stack Buffer Commands, Emacs Byebug Commands
937
+ @section Emacs Byebug Variable Buffer Commands
938
+
939
+ @table @kbd
940
+ @item (rdebug-variables-edit)
941
+ @findex rdebug-variables-edit
942
+ @end table
943
+
944
+ @node Emacs Byebug Watch Buffer Commands, Emacs GUD Commands, Emacs Byebug Variable Buffer Commands, Emacs Byebug Commands
945
+ @section Emacs Byebug Watch Buffer Commands
946
+
947
+ @table @kbd
948
+ @item (rdebug-watch-add)
949
+ @findex rdebug-watch-add
950
+ Add a display expression.
951
+ @item (rdebug-watch-delete)
952
+ @findex rdebug-watch-delete
953
+ Delete a display expression.
954
+ @item (rdebug-watch-edit)
955
+ @findex rdebug-watch-edit
956
+ Edit a display expression.
957
+ @item (rdebug-watch-mode)
958
+ @findex rdebug-watch-mode
959
+ Major mode for displaying the display expressions. Uses
960
+ @var{rdebug-watch-mode-map}.
961
+ @end table
962
+
963
+ @node Emacs GUD Commands, , Emacs Byebug Watch Buffer Commands, Emacs Byebug Commands
964
+ @section Emacs Byebug GUD Commands
965
+
966
+ @table @kbd
967
+ @item (comint-copy-old-input)
968
+ @findex comint-copy-old-input
969
+ Insert after prompt old input at point as new input to be edited.
970
+ Calls `comint-get-old-input' to get old input.
971
+ @item (comint-delete-output)
972
+ @findex comint-delete-output
973
+ Delete all output from interpreter since last input.
974
+ Does not delete the prompt.
975
+ @item (gud-break)
976
+ @findex gud-break
977
+ Set a breakpoint on the source line point is on.
978
+ @item (gud-cont) - c
979
+ @findex gud-cont (c)
980
+ Continue execution.
981
+ @item (gud-next) - n
982
+ @findex gud-next (n)
983
+ Step one line, skipping functions. (Step over).
984
+ @item (gud-refresh)
985
+ @findex gud-refresh
986
+ Fix up a possibly garbled display, and redraw the arrow.
987
+ @item (gud-remove)
988
+ @findex gud-remove
989
+ Remove breakpoint at current line.
990
+ @item (gud-step) - s
991
+ @findex gud-step (s)
992
+ Step one statement. (Step into)
993
+ @item (gud-step-plus) - +
994
+ @findex gud-step-plus (+)
995
+ Run @code{step+}---like @code{gud-step} but ensure we go to a new
996
+ line.
997
+ @item (gud-tbreak @var{arg})
998
+ @findex gud-tbreak
999
+ Set temporary breakpoint at current line.
1000
+ @end table
1001
+
1002
+ @node Emacs Command Index, Emacs Function Index, Emacs Byebug Commands, Top
1003
+ @unnumbered Emacs Command Index
1004
+ @printindex pg
1005
+
1006
+ @node Emacs Function Index, Emacs Key Binding Index, Emacs Command Index, Top
1007
+ @unnumbered Emacs Function Index
1008
+ @printindex fn
1009
+
1010
+ @node Emacs Key Binding Index, , Emacs Function Index, Top
1011
+ @unnumbered Key Binding Index
1012
+ @printindex ky
1013
+
1014
+ @tex
1015
+ % I think something like @colophon should be in texinfo. In the
1016
+ % meantime:
1017
+ \long\def\colophon{\hbox to0pt{}\vfill
1018
+ \centerline{The body of this manual is set in}
1019
+ \centerline{\fontname\tenrm,}
1020
+ \centerline{with headings in {\bf\fontname\tenbf}}
1021
+ \centerline{and examples in {\tt\fontname\tentt}.}
1022
+ \centerline{{\it\fontname\tenit\/},}
1023
+ \centerline{{\bf\fontname\tenbf}, and}
1024
+ \centerline{{\sl\fontname\tensl\/}}
1025
+ \centerline{are used for emphasis.}\vfill}
1026
+ \page\colophon
1027
+ % Blame: doc@cygnus.com, 1991.
1028
+ @end tex
1029
+
1030
+ @bye