From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: [External] : Re: Learning Edebug Date: Sat, 21 Dec 2024 18:44:47 +0000 Message-ID: References: <130443705.1910512.1734664285448.ref@mail.yahoo.com> <130443705.1910512.1734664285448@mail.yahoo.com> <86frmhk1b0.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8333"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lewis Creary To: Joel Reicher , Lewis Creary via Users list for the GNU Emacs text editor Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 21 19:45:47 2024 Return-path: Envelope-to: geh-help-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 1tP4Ty-00020H-S4 for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 21 Dec 2024 19:45:47 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tP4TJ-0004Lf-A5; Sat, 21 Dec 2024 13:45:05 -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 1tP4TH-0004LR-HH for help-gnu-emacs@gnu.org; Sat, 21 Dec 2024 13:45:03 -0500 Original-Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tP4TF-0004CY-Ai for help-gnu-emacs@gnu.org; Sat, 21 Dec 2024 13:45:02 -0500 Original-Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4BLFLc6a005873; Sat, 21 Dec 2024 18:44:54 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s= corp-2023-11-20; bh=fJU0JLXY9OE6dlJb2B0VjhHdhJcrzTqb+xT1HFscFVc=; b= MkWmQg7u6oqtkknyHG5YUJK+OT1nkc4IF8/tMALCY8TSpC9PR/Egce4rIzookrG8 iVJ4kErxK/BmNXDr66S1afAKBU5FaWvwoKVCEdxZ/Rt2/bdlqbPmXbwJ3GW6ypLp nQoYRorwfhp+uw5NQ/eDpFF6MRp7iUN4VUEQ/NThzYrPEGy5XxZ2z0YPfD0ux4GV LBwLApeBBwVaQ7WvTthkN/AFyR0LqjCYIbcu7+tObMDooqQF5dSfdELRraYYs1EU qlKYHj+9GMKqmKWQ+gnn+22N5F2S0jydMOQG3SS5iSs6kXJ6cpcQhjVwnBkFnTzK aD87qZPwwTMmo5sqPj5ljg== Original-Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 43nqd5ge94-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 21 Dec 2024 18:44:54 +0000 (GMT) Original-Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 4BLGAReD038588; Sat, 21 Dec 2024 18:44:53 GMT Original-Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2174.outbound.protection.outlook.com [104.47.57.174]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 43nm4bpk67-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 21 Dec 2024 18:44:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=NL0z2Mvu3f1SRkFBYe1XJrHSHknIwJnEOITXjxMQbIth6Cjjh34kRwg6Ww0pOF8LPUVjuOokWQ8xaOZUUG7FSV0LJ6lnxN1Z6qcQ4rnEvVicKGHvXB+ms9sqzU+FWOpLl74VnDBWEtfmsI6LXxK5fXD7W2cYHznAgRqROKbZvv3Wj6PSUtUFpqV6HdbrJzw30pHwlBCNlWxHcBt3UVoeR4W5RDbRnMbP3wi0Z9s0y0zinfwYsE9evxTilk/STCNUaSjTkunfErsC0yhor/XnJgomJ5c/EmEYmiDWJK9rpfG5iJStvdRZJLic9vPTFM1ByvBjZyd5T0ofRa5UMArHWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fJU0JLXY9OE6dlJb2B0VjhHdhJcrzTqb+xT1HFscFVc=; b=fywCR9Zi+Y3aCiC/0WLsjL4Ol0EPCacMNjpRlybN/M1GxAgvJTzGql52JTw69q9g5kn2Yc1RvxqBpZJsWyEnTpw5INgFWbSK84pKY366+c48fO/dPHKzMgmgWis+lq2C4wCPdfdKYXeRvlw2iabd09ToynMy8xL0wb2Om9D4ENrW12RrWqm9p1OPKNEo98gIpyVKwC5IM+oFbVtk3v5fV8mvYOihfg+z9msRBYhF5QNcg3MiXWYGqQ9Zsl5djGhOFJAvx7pln6lGev4FlH8esaRV+GFIiUGzLK/932wYOWFgcHlbgnKj9L5tnKEAo8wr6gZZBakfK0BUoIcmvcjdIg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fJU0JLXY9OE6dlJb2B0VjhHdhJcrzTqb+xT1HFscFVc=; b=C1ygHRnc+5qtk4Ry6Y8IiS4Og2JgK6algzl5BAjykdO5KFvEACXUYHVraHwhhWAfrnsoGs29/izEBmBM68t4b0ycm+HB+OZq15Njqqr087NXekPJd5yjDTlDrWuzdc8Dv+p8bC3a8EdSmfLyaSCSHqJshz3GdPn+wE+5zEyoh08= Original-Received: from DS7PR10MB5232.namprd10.prod.outlook.com (2603:10b6:5:3aa::24) by MW5PR10MB5761.namprd10.prod.outlook.com (2603:10b6:303:19a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.17; Sat, 21 Dec 2024 18:44:47 +0000 Original-Received: from DS7PR10MB5232.namprd10.prod.outlook.com ([fe80::8303:658f:14f8:2324]) by DS7PR10MB5232.namprd10.prod.outlook.com ([fe80::8303:658f:14f8:2324%5]) with mapi id 15.20.8272.013; Sat, 21 Dec 2024 18:44:47 +0000 Thread-Topic: [External] : Re: Learning Edebug Thread-Index: AQHbU3AVsv1XiFllwkiZALVcdd2bL7LxBUOw In-Reply-To: <86frmhk1b0.fsf@gmail.com> Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DS7PR10MB5232:EE_|MW5PR10MB5761:EE_ x-ms-office365-filtering-correlation-id: 45a05b51-ae75-4803-5de0-08dd21ef8b40 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|1800799024|376014|366016|38070700018; x-microsoft-antispam-message-info: =?us-ascii?Q?PXX6JnIdNs66jHhcAzROjo8124AGqM7Q0BQNvWeHULfVY0QkI9WtZbh1SIDn?= =?us-ascii?Q?rLpded5gHnP23pOPwyEqI02skON+Cu6SkndRMuMbM0M8H+/z9lNUjnEuK9Ed?= =?us-ascii?Q?jP0eicRiGYdJwV0I4KtSkdC1oKcsWPBSESdQp5rjvyvQso80dpsXrGFkN7vu?= =?us-ascii?Q?jzQWfhkkmICIhj5uf81jkXTBXeBMlPwH1FZMdRGWvDSLfcuKR9CX8ND4ywTI?= =?us-ascii?Q?ver5KBWHskJ1+AFLR3nOMJxBVY6wLaj7OAlWrctB3mvORJYAsdw1zE6usE0r?= =?us-ascii?Q?DfaH6047CR1SQOzqONdxzX+fY3sLtVK9yiPwBEyaRA52l3WCL+k19uhNx4CZ?= =?us-ascii?Q?eoGfnTCXxf9cZeu1NZrtykwQx0blK6GCrPcL7g+YfSSiW89Dkd7OZFIhtkBM?= =?us-ascii?Q?DaqeeWtHkAcy9e8+cH7wljrlsxs2OD6V8fnyuf1VkVAKe0fp+D46/jOgqQ2x?= =?us-ascii?Q?GTfHuc8GHWtyUzNGA5AiLLtLGc5k0En+X/soCP0rUtHVQwGHQNxzo+hHUfGP?= =?us-ascii?Q?weFs7augCPQIwVB3j5s6Ny0ibS7p54pUV9xm1PAlLX5BDu+pmNUeczMn/5EW?= =?us-ascii?Q?g+cWjGvK3wzmRHEOUdqWoL2XKkUtMP7P/L25hLY3qK6htchacMHNpsxCMDZd?= =?us-ascii?Q?gp9DF x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS7PR10MB5232.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(366016)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?MS6zbOnRLlC/PzfcXEt6N5byNix9aK4gj3hijavkLO0slcPZ1U+BJ0gByfSy?= =?us-ascii?Q?3mruK4b22WsDR6lO3fxtbdIsiLytHmL4Aqz0JBvExtA+bQKZ5TT2fbXiwc3h?= =?us-ascii?Q?r2O02eSZd+AfePrIRrHZEbnyftf91sVAkoUrGByhveApc8IgcjxYkW1faL0e?= =?us-ascii?Q?gi+crBdoc8Yd12F2fn9dDrZ/1FiZF464PJQ8fqH/KmUNtsssa8KCA7NC5aBm?= =?us-ascii?Q?k1BeD5GXSFNQDjbZuK7qJbz9xw+O7U2qPBItwjVVd3/vWPWHtreTmNPGuY6l?= =?us-ascii?Q?Qcvm38xP94vvt+aJEj8a18xIkYCxdQiQ4TvS4NYZiNTl6mcGY8Fz5HlTzFsf?= =?us-ascii?Q?UagTvFtD7NL6xOp5VH3DUNkwDVF46MRGByrOid5JOTQcmvBVQf47N6QCfHqu?= =?us-ascii?Q?AkzN/qK3nyhmqahOUrtL9oyT36jcwcSFlAmrY7GWbrOgEawpe7MCNmREVKpU?= =?us-ascii?Q?BJKLyE+ZDBUJFZB5aj3oWJORk3le+nEnQSGfGMV0R1TJUhZQS/x40lLusi9a?= =?us-ascii?Q?mTyh81N0Efs5nIX0C4v/uxhfuTyeLmozkRZhEqQPv75vGwP76eN8E4QUFNAM?= =?us-ascii?Q?PuiZ4PcKLrN5DrcdnIUDWhZBwUdaXpo1FFk43JoMRAchd7UA6luLonWWD28B?= =?us-ascii?Q?2v X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: ipvFA0ONRQEwx7tdguYfsyNyGUzGnYVc8d8iVI5z+S1kgj+LrY5cY/9DBjHU4h0qmGYVJKgfOi00dllmomaSybUSwvNDcTETSJVkPkdyfqVTr92SvkZm6hhQqn+JckujoJuhVmLJFMqhk4PK8HOk+ed2t0iu5b6uYP72y072Mxw1WuPm5R+RA5xC9e6/jQ8rMyoIKc2eUmg4JbXWFua6ekeOJK3KPCVqdEJIYPRjpjhT9C+wNNhieHIy/xFH/q9nH6R4D+XzG9S8+NRoHtLUXOCeH1w1jdxPzlwCHtH7csYSKd2+BTBaZ55vxrhcQ5rzo82fsRvjAMFveSiif/kj5SIDAG3mLighIPIYXutSH0NhwqfRVQXUHY3gKST3axIeQgc0868yWBWlf+CDjeNICvsy1aHKotioOUnR6ntWkdBESU7QlUhkcVXAH+uqJ3pE6aCjF2y0f5OEa5Ipf1JKyZlhDVGka5TvWs2bl+lfe7gurBUyVhHwm6bHrFF8+aSWPdSwGPX645rFMxOrWmyMVN2tB7PnriFAeiskU/ZRbpGi0FoJDJkdKg6mCh5Cg6N4dkYdbgb7vhR9mXki+eNKNMcLf7Nxm3EVVXf1Ql5clXo= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DS7PR10MB5232.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 45a05b51-ae75-4803-5de0-08dd21ef8b40 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Dec 2024 18:44:47.3133 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Y8tATOlZbWz95IZbzdw/PWaShuj9H6ydoGm1N8ut50mAzQ4tlDXUxxvcWSXg3ka7cMnUY2Rqj8nJdH9j3vz1fA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW5PR10MB5761 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2024-12-21_08,2024-12-19_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 mlxscore=0 malwarescore=0 suspectscore=0 mlxlogscore=875 adultscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2411120000 definitions=main-2412210168 X-Proofpoint-GUID: RBN44_Mn0Xf-byQUdgyFKCMaPrX6Eume X-Proofpoint-ORIG-GUID: RBN44_Mn0Xf-byQUdgyFKCMaPrX6Eume Received-SPF: pass client-ip=205.220.177.32; envelope-from=drew.adams@oracle.com; helo=mx0b-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:148910 Archived-At: > instrumenting code is basically what you've been=20 > doing with print statements. When edebug=20 > instruments the code and inserts its own debugging > snippets, you can execute the code normally and > the instrumentation that edebug inserted will call=20 > the edebug functionality. In Elisp the equivalent of a print statement is a `message' call: (message "foo value at position 42: %S" foo) You can insert calls to `message' in your code=20 anywhere, to provide trace-like behavior and not invoke any debugger. You can also invoke the (classic) Lisp debugger by inserting breakpoints in your code anywhere. These are just calls to function `debug'. In the debugger, you can use the key `e' to evaluate any Lisp expression _within the context of the stack_, i.e., the current control context. As a shortcut, you can insert a `debug' breakpoint that immediately evaluates a sexp you pass to function `debug' as an argument, saving you from typing it and hitting `e'. If you just immediately hit `c', to continue (exiting) the debugger that was just entered (or `q' to quit), then This is akin to using=20 `message' (or `error'). You pass the sexp to evaluate as the second arg to `debug', using `nil' as the first: (debug nil (some-expression)) These are _ad hoc_ ways to get info at particular places. Easy to control (on/off for particular breakpoints by commenting out=20 their `debug' calls).