elisp debug
M-x 是运行command的意思。
若使用常规Emacs debugger(即不使用edebuger),先把要debug的函数加入到debug-on-entry:
然后再使用eval-last-sexp命令运行单句elisp(需要移动焦点point到函数调用处),一般情况下它被绑定到键盘C-x C-e,
C-x C-e runs the command eval-last-sexp
然后就会popup一个debug窗口,按d键就可以单步调试,c键是skip and continue。
若要查看帮助,可以:
1、C-h a, 查看包含字串的command,C-h a runs the command apropos-command
2、C-h f, 查看elise的函数,describe-function,它可以查看function和command,其实command也是function。
3、C-h v, 查看变量,describe-variable
4、C-h m,查看mode的帮助, describe-mode
在emacs里执行elisp语句 :
(M-x 后面跟任何function原则上都可以交互执行,比如:M-x getenv RET 之后,输入USER就可以获得环境用户名)
M-x eval-buffer 如果你有一个代码块要执行,把它拷贝到一个新建的buffer,然后执行行首的命令。
M-x eval-region If you want something less hamfisted(拳头) you can tell Emacs to only evaluate the region by marking what you want to run and executing(代码不多可以选择执行region,没拳头那么大)
C-x C-e which is bound to eval-last-sexp: 这句和emacs工作的模式有关,但大多数模式都支持。但这句有一些特别 地方:它不会更新由defvar 或 defcustom什么的变量的值,另外你必须把point(光标)移动 到要执行的语句的结尾。C-M-x eval-defun,它可能是执行某条命令的最好方式了。它基本没有上面的命令的任何问题,你可 以在一个form的任何地方执行这条命令,它会自动选择执行最外层的form。
M-: 被绑定到eval-expression,是让你自己输入要执行的语句,如 (getenv "USER")。
M-! cmd RET
Run the shell command line cmd and display the output (shell-command).
M-| cmd RET
Run the shell command line cmd with region contents as input; optionally replace the region with the output (shell-command-on-region).
M-x shell
Run a subshell with input and output through an Emacs buffer. You can then give commands interactively.
M-x term
Run a subshell with input and output through an Emacs buffer. You can then give commands interactively. Full terminal emulation is available.
M-x eshell
Start the Emacs shell.
elisp debug的更多相关文章
- jmeter sampler maven项目排错记
eclipse 创建的maven项目,引入jar包之后出现红色叹号,一直找不到原因,连main方法都无法运行,提示找不到类: 错误: 找不到或无法加载主类 soapsampler.SoapSample ...
- 记一次debug记录:Uncaught SyntaxError: Unexpected token ILLEGAL
在使用FIS3搭建项目的时候,遇到了一些问题,这里记录下. 这里是发布搭建代码: // 代码发布时 fis.media('qa') .match('*.{js,css,png}', { useHash ...
- .NET Core的日志[3]:将日志写入Debug窗口
定义在NuGet包"Microsoft.Extensions.Logging.Debug"中的DebugLogger会直接调用Debug的WriteLine方法来写入分发给它的日志 ...
- 设置tomcat远程debug
查看端口占用情况命令: netstat -tunlp |grep 8000 tomcat 启动远程debug: startup.sh 中的最后一行 exec "$PRGDIR"/& ...
- Android NDK debug 方法
最近又频繁遇到 NDK 的错误,记录一下debug调试的一些经验,以备后续查看 一般来说,在Android Studio中的Monitor中将过滤器的 LOG TAG 设置为 "DEBUG& ...
- 玩转Windows服务系列——Debug、Release版本的注册和卸载,及其原理
Windows服务Debug版本 注册 Services.exe -regserver 卸载 Services.exe -unregserver Windows服务Release版本 注册 Servi ...
- struts debug 标签
< s:debug> 引起下面的错误 org.apache.jasper.JasperException: Caught an exception while getting the pr ...
- How to debug .NET Core RC2 app with Visual Studio Code on Windows?
Simone Chiaretta (http://codeclimber.net.nz/archive/2016/05/20/How-to-debug-NET-Core-RC2-app-with-Vi ...
- Debug Databinding Issues in WPF
DataBinding is one of the most powerful features in WPF. But because it resolves the bindings at run ...
随机推荐
- 转 Android的消息处理机制
来自:http://blog.csdn.net/andyhuabing/article/details/7368217 Windows编程的朋友可能知道Windows程序是消息驱动的,并且有全局的消息 ...
- 【POJ】3134 Power Calculus
1. 题目描述给定一个正整数$n$,求经过多少次乘法或除法运算可以从$x$得到$x^n$?中间结果也是可以复用的. 2. 基本思路实际结果其实非常小,肯定不会超过20.因此,可以采用IDA*算法.注意 ...
- Android 中Activity生命周期分析:Android中横竖屏切换时的生命周期过程
最近在面试Android,今天出了一个这样的题目,即如题: 我当时以为生命周期是这样的: onCreate --> onStart -- ---> onResume ---> onP ...
- C++ STL之set的基本操作
set是集合,虽然也存在键值和实值,不过两者根本就是同一个值,键值的设置完全就是为了满足红黑树的底层结构,set操作与map很像不过也有些不同. 1. set迭代器与map的不同: (1)set使用接 ...
- BootStrap弹窗
效果图: 注意引入的文件,js文件要在前面 Bootstrap框架中的模态弹出框,分别运用了“modal”.“modal-dialog”和“modal-content”样式,而弹出窗真正的内容都放置在 ...
- [转]ASP.NET 页生命周期概述
原文链接:http://msdn.microsoft.com/zh-cn/library/ms178472(v=vs.110).aspx 对应版本:.NET 4.0 ASP.NET 页运行时,此页将 ...
- HDU 1232 畅通工程 (并查集,常规)
题意:中文题目 思路:按照HDU1213来做.http://www.cnblogs.com/xcw0754/p/4607813.html #include <bits/stdc++.h> ...
- Java [Leetcode 231]Power of Two
题目描述: Given an integer, write a function to determine if it is a power of two. 解题思路: 判断方法主要依据2的N次幂的特 ...
- 省常中模拟 Test3 Day2
matrix 找规律 题意:给定一个 N*N 的只有 0 和 1 的矩阵,有 Q 个操作,分三种:1. 将某行上的所有数字取反:2. 将某列上的所有数字取反:3. 输出 sum{ a[i][j]*a[ ...
- ffmpeg/ffplay vc6 源码剖析
ffmpeg/ffplay是当今多媒体领域的王者,很多很多的人想研究学习ffmpeg/ffplay,但苦于ffmpeg/ffplay庞大的代码量,令人望而生畏.为帮助更多的人研习ffmpeg/ffpl ...