emacs.rst
changeset 177 02b79b857ee1
parent 171 8e806cddee36
child 179 e225b746945d
equal deleted inserted replaced
173:939f50e22bda 177:02b79b857ee1
     2 
     2 
     3 * Debugging.
     3 * Debugging.
     4 
     4 
     5 ** Using edebug.
     5 ** Using edebug.
     6 
     6 
     7 Execute ‘M-x edebug-defun’ (also on ‘C-u C-M-x’) on defun in source code to
     7 Execute 'M-x edebug-defun' (also on 'C-u C-M-x') on defun in source code to
     8 enable debugging for desired function. When next time this function invoked
     8 enable debugging for desired function. When next time this function invoked
     9 you entered to its debugging (jamped to its source code).
     9 you entered to its debugging (jamped to its source code).
    10 
    10 
    11 To start debug execute code which used debugged function.
    11 To start debug execute code which used debugged function.
    12 
    12 
    13 You can disable edebug on a function by evaluating the function again using
    13 You can disable edebug on a function by evaluating the function again using
    14 ‘C-M-x’.
    14 'C-M-x'.
    15 
    15 
    16 ** How debug func?
    16 ** How debug func?
    17 
    17 
    18 Use M-x debug-on-entry and M-x cancel-debug-on-entry to control
    18 Use M-x debug-on-entry and M-x cancel-debug-on-entry to control
    19 which functions will enter the debugger when called.
    19 which functions will enter the debugger when called.
    44 
    44 
    45   $ emacs --no-init-file --no-site-file --debug-init
    45   $ emacs --no-init-file --no-site-file --debug-init
    46 
    46 
    47 *** Simplified Binary Search.
    47 *** Simplified Binary Search.
    48 
    48 
    49 Add (error “No error until here”) in the middle of your file. If you get the
    49 Add (error 'No error until here') in the middle of your file. If you get the
    50 error “No error until here” when reloading the file, move the expression
    50 error 'No error until here' when reloading the file, move the expression
    51 towards the back of the file, otherwise towards the front of the file.
    51 towards the back of the file, otherwise towards the front of the file.