Debugging elisp调试,函数失败时显示回溯

Debugging elisp调试,函数失败时显示回溯,debugging,emacs,backtrace,Debugging,Emacs,Backtrace,我希望在运行此代码时看到错误的回溯 (make-network-process :name (dbgp-make-listner-name 10004) :server 1 :service 10004 :family 'ipv4 :nowait t :noquery

我希望在运行此代码时看到错误的回溯

 (make-network-process :name (dbgp-make-listner-name 10004)
                       :server 1
                       :service 10004
                       :family 'ipv4
                       :nowait t
                       :noquery t
                       :filter 'dbgp-comint-setup
                       :sentinel 'dbgp-listener-sentinel
                       :log 'dbgp-listener-log)

这表明我可以看到在
makenetworkprocess
下发生了什么

Debugger entered--Lisp error: (file-error "make client process failed" "connection refused" :name "localhost" :buffer # :host "localhost" :service 9988 :nowait nil)
make-network-process(:name "localhost" :buffer # :host "localhost" :service 9988 :nowait nil)
open-network-stream("localhost" # "localhost" 9988 :type plain :nowait nil)
byte-code . . . 
url-open-stream("localhost" # "localhost" 9988)
url-http-find-free-connection("localhost" 9988)
url-http([cl-struct-url "http" nil nil "localhost" 9988 "/execute/default" nil nil t nil t] #128 "\302\303\304p#\210\300\305\240\210\301p\240\207" [(nil) (nil) url-debug retrieval "Synchronous fetching done (%S)" t] 5 "\n\n(fn &rest IGNORED)")
url-retrieve-internal("http://localhost:9988/execute/default" #128 "\302\303\304p#\210\300\305\240\210\301p\240\207" [(nil) (nil) url-debug retrieval "Synchronous fetching done (%S)" t] 5 "\n\n(fn &rest IGNORED)" nil nil)
url-retrieve("http://localhost:9988/execute/default" #[128 
我试过了

在错误时切换调试
edebug eval defun

但是我看不到回溯

*Backtrace*
缓冲区中,我可以看到

Debugger entered: nil
  (progn (debug) (make-network-process :name (dbgp-make-listner-name 10004) :server 1 :service 10004 :family (quote ipv4) :nowait t :noquery t :filter (quote dbgp-comint-setup) :sentinel (quote dbgp-listener-sentinel) :log (quote dbgp-listener-log)))
  eval((progn (debug) (make-network-process :name (dbgp-make-listner-name 10004) :server 1 :service 10004 :family (quote ipv4) :nowait t :noquery t :filter (quote dbgp-comint-setup) :sentinel (quote dbgp-listener-sentinel) :log (quote dbgp-listener-log))) nil)
  edebug-eval-defun(nil)
  apply(edebug-eval-defun nil)
  eval-defun(nil)
  funcall-interactively(eval-defun nil)
  call-interactively(eval-defun record nil)
  command-execute(eval-defun record)
  helm-M-x(nil "eval-defun")
  funcall-interactively(helm-M-x nil "eval-defun")
  call-interactively(helm-M-x nil nil)
  command-execute(helm-M-x)

虽然第一个跟踪显示了
make network process
背后发生了什么,但我的跟踪没有深入..

所以问题是如何在回溯中获得更多细节

对于字节编译的elisp函数,加载所讨论的库的未编译版本通常会提供更多详细信息,因为调试器可以向您显示函数中发生事情的确切位置

然而,在本例中,
make network process
是一个C函数,因此您现在看到的是从elisp调试器中获得的所有内容


如果您想了解更多信息,您必须检查/调试process.c中的源代码。

您说您看不到回溯,然后向我们展示您可以看到的回溯。请澄清?@phils:我添加了另一个回溯,它位于
生成网络进程
下面。我知道
使网络进程
失败,想找出原因。那么他是如何看待C函数的回溯
字节码
部分的呢。?什么意思?该页面上的回溯仅限于您自己的回溯,在调用
makenetworkprocess
时停止。C函数没有字节码(根据定义,假定它们不是elisp)。请注意,堆栈帧在回溯中从最新到最旧(从上到下)显示。错误后显示的第一件事是最近的调用,从中触发了错误。下面的帧是指向该点的事件。