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.devel Subject: Re: How to highlight the offending line of code with edebug Date: Mon, 02 Jan 2023 13:57:22 +0200 Message-ID: <837cy52lp9.fsf@gnu.org> References: <83fsd68u3f.fsf@gnu.org> <87ili2o9lc.fsf@md5i.com> <83zgbe7bu1.fsf@gnu.org> <83bknq2vrk.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15046"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mwd@md5i.com, emacs-devel@gnu.org To: Davin Pearson Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jan 02 12:58:04 2023 Return-path: Envelope-to: ged-emacs-devel@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 1pCJS7-0003f8-UC for ged-emacs-devel@m.gmane-mx.org; Mon, 02 Jan 2023 12:58:03 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pCJRf-0006Lc-Gy; Mon, 02 Jan 2023 06:57:35 -0500 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 1pCJRd-0006Ht-Iu for emacs-devel@gnu.org; Mon, 02 Jan 2023 06:57:33 -0500 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 1pCJRd-00040a-5u; Mon, 02 Jan 2023 06:57:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=YR1d0YxOu8XGns3AQ4VopVJIrOD20HDjmeg5kP2hVR0=; b=qxLLDtzcf+oNT2iW/Mzk NDszZgkp7k39OPL3yUjLB3wUxJPUWwHR5vNLljr1dRmmkgTZ4FRTkaMf7dlNDwbOrWvJqwtIyfgIU SjtjTJ6Njl9cYW3LQRsjyBRx3t1PYEg3KKQKJFzUcM2yk1jeA19SVMXXVGmX6QOe+yrFVCPrLyFEi lvqWc9Ra4Tnx9vqooU49Sv/tMawBiBc05gk4DAE3DA94OHykntedgOvJy715qbjITB0Sr9Ssn5HUY lx7q0lSn4pJSUjuVgIwPCRDEp6Kmm5egIudnvpjTI2Sr9y7ME4W0aOwyx1ZlMMsTX7xoefYn3yLvK vOaEMgKlRcMfNA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pCJRL-0002a4-De; Mon, 02 Jan 2023 06:57:32 -0500 In-Reply-To: (message from Davin Pearson on Mon, 2 Jan 2023 13:27:08 +1300) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:302191 Archived-At: > From: Davin Pearson > Date: Mon, 2 Jan 2023 13:27:08 +1300 > Cc: mwd@md5i.com, emacs-devel@gnu.org > > (progn > (setq edebug-eval-top-level-form t) > (setq edebug-all-defs t) > (setq edebug-all-forms t) > (setq edebug-on-error t)) > > (defun smegulator () > void-variable-smeg > ) > > ;;(smegulator) > > (defmacro dmp-quote (&rest rest) > t) > > (dmp-quote > > When I put the following code at the start of > my .emacs file it executes without errors as > it should. > > However when I evaluate (smegulator) it brings > up the following message, without a black triangle > > elisp--eval-last-sexp: Symbol’s value as variable is void: void-variable-smeg > > When I execute C-u C-M-x on (defun smegulator () void-variable-smeg) > it brings up the following messages. > > edebug-after: Symbol’s value as variable is void: void-variable-smeg > > elisp--eval-last-sexp: Symbol’s value as variable is void: void-variable-smeg > with a black triangle indicating we are in edebug mode. > > How do I get the black triangle online in other files for debugging my code? > > i.e. how do you get Emacs to do a C-u C-M-x on every defun without doing > it manually C-u C-M-x for every function one at a time? According to the manual, you should do the following, in the order shown: . set edebug-all-forms to a non-nil value . mark the region around your code . type "M-x eval-region RET"