From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#65897: 29.1.50; Debugging errors surfaced through emacsclient is hard Date: Thu, 14 Sep 2023 17:54:28 +0300 Message-ID: <83msxols9n.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39190"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 65897@debbugs.gnu.org To: Spencer Baugh , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 14 16:55:28 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qgnkd-000A15-SX for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Sep 2023 16:55:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qgnkA-0008Ck-3v; Thu, 14 Sep 2023 10:54:58 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qgnk8-0008C9-I8 for bug-gnu-emacs@gnu.org; Thu, 14 Sep 2023 10:54:56 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qgnk8-0003gm-AH for bug-gnu-emacs@gnu.org; Thu, 14 Sep 2023 10:54:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qgnkE-0002un-5X for bug-gnu-emacs@gnu.org; Thu, 14 Sep 2023 10:55:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Sep 2023 14:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65897 X-GNU-PR-Package: emacs Original-Received: via spool by 65897-submit@debbugs.gnu.org id=B65897.169470329211186 (code B ref 65897); Thu, 14 Sep 2023 14:55:02 +0000 Original-Received: (at 65897) by debbugs.gnu.org; 14 Sep 2023 14:54:52 +0000 Original-Received: from localhost ([127.0.0.1]:40836 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qgnk4-0002uM-2h for submit@debbugs.gnu.org; Thu, 14 Sep 2023 10:54:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44818) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qgnk2-0002u9-E8 for 65897@debbugs.gnu.org; Thu, 14 Sep 2023 10:54:51 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qgnjq-0003aU-GZ; Thu, 14 Sep 2023 10:54:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=AYiBs0+zYVs3HrnpRQmelgA2YEDQP72zCp5RABDmA2k=; b=aZL4tx+05LM4 7e9seAOazir2QWKRvFsDj6db8pgnK/lDsGawOqjIGcAlF/Pv0EINX2KGgVljhNxsS/Vqa2wMtj/Db gqmwzMne0/7GBUF7jLOScyHFHeV3zsvUlTFCI6Zo+w8B6ulHPPJXyd6cI+ucm3N6Wq7w1aBHLExM7 yZT19L073d7HdeN88vlBASPDVadLA6mRbOpydTdRVQCpcRPIa/kBPRNX2WwxbqwFr63F0NiGIwY2t cnbGO4EnSucYZlJtefpXdNPG04+ef8Y/w5hHKJb+Gopq5gGo3TiSG8vfQGlGW3rjvnLSpDAGzbvST oYVuce+cVGmQgG2SIGA1/w==; In-Reply-To: (message from Spencer Baugh on Tue, 12 Sep 2023 15:42:37 -0400) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:270442 Archived-At: > From: Spencer Baugh > Date: Tue, 12 Sep 2023 15:42:37 -0400 > > Toy example: > 1. emacs -Q > 2. (server-start) > 3. (add-hook 'before-make-frame-hook (lambda () (error "frame hook error"))) > 4. emacsclient -c > > The output of emacsclient is: > > Waiting for Emacs... > *ERROR*: frame hook error > > That's all, there is no way to get more information about the error that > happened. > > Ideally, when emacsclient encounters an error and debug-on-error is > non-nil, it should cause Emacs to enter the debugger. I'm not sure we can allow entering the debugger from server-execute. That function is documented as being called from timers and process filters, so entering the debugger might be unsafe. Stefan, any comments?