1 %%%% This file is part of LilyPond, the GNU music typesetter.
3 %%%% Copyright (C) 2009--2012 by Ian Hulin <ian@hulin.org.uk>
5 %%%% LilyPond is free software: you can redistribute it and/or modify
6 %%%% it under the terms of the GNU General Public License as published by
7 %%%% the Free Software Foundation, either version 3 of the License, or
8 %%%% (at your option) any later version.
10 %%%% LilyPond is distributed in the hope that it will be useful,
11 %%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
12 %%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 %%%% GNU General Public License for more details.
15 %%%% You should have received a copy of the GNU General Public License
16 %%%% along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
20 %% \include this file to enable the setting of breakpoints in guile.
21 %% Once loaded, this file will open a guile prompt. Type
23 %% at the guile prompt to get a list of possible commands.
24 %% For more information, see the Contributor's Guide.
29 % define lilypond-module as a variable in the guile-user module and set
30 % to the current Scheme module (which will be the lilypond top-level
33 #(module-define! (resolve-module '(guile-user))
37 % Ensure we have command-line recall available at the guile prompt
39 #(use-modules (ice-9 readline))
41 #(display "\n Guile debugger for Lilypond")
42 #(display "\n For help enter (debug-help)\n")
44 % Ensure debugger definitions are available in lilypond-module and guile-user
46 #(use-modules (scm guile-debugger))
47 #(ly:module-copy (resolve-module '(guile-user))
48 (resolve-module '(scm guile-debugger)))
51 % top-repl has re-set the module to guile-user,
52 % so we need to set it back to lilypond-module
54 #(ly:module-copy (current-module) (resolve-module '(lilypond-module)))
55 #(set-current-module lilypond-module)