Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

An optimist believes we live in the best world possible; a pessimist fears this is true.


devel / comp.lang.python / Re: Applying winpdb_reborn

SubjectAuthor
o Re: Applying winpdb_rebornChris Angelico

1
Re: Applying winpdb_reborn

<mailman.413.1622330755.3087.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=13424&group=comp.lang.python#13424

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: ros...@gmail.com (Chris Angelico)
Newsgroups: comp.lang.python
Subject: Re: Applying winpdb_reborn
Date: Sun, 30 May 2021 09:25:41 +1000
Lines: 35
Message-ID: <mailman.413.1622330755.3087.python-list@python.org>
References: <alpine.LNX.2.20.2105290945570.25842@salmo.appl-ecosys.com>
<YLLINtUcjvqf4rdN@cskk.homeip.net>
<CAPTjJmqqr=jjxHeDFwH1V10an30j05698SzE8Bz7NqtCv2u9xg@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: news.uni-berlin.de hDLIdisnGGedT57F9IFHgw5cEB6jJLLPAvW3G+jYakGQ==
Return-Path: <rosuav@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=gmail.com header.i=@gmail.com header.b=bYIUJ7Dk;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.003
X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; '3.7': 0.03; 'traceback':
0.04; 'debug': 0.07; 'debugging': 0.07; 'sun,': 0.07;
'fundamental': 0.09; 'prints': 0.09; '(plus,': 0.16; 'breakpoint':
0.16; 'bugs': 0.16; 'builtin': 0.16; 'cameron': 0.16; 'chrisa':
0.16; 'debugger': 0.16; 'drops': 0.16; 'from:addr:rosuav': 0.16;
'from:name:chris angelico': 0.16; 'inspect': 0.16; 'invoke': 0.16;
'level,': 0.16; 'shepard': 0.16; 'simpson': 0.16; 'wrote:': 0.16;
'python': 0.16; 'instead': 0.17; 'figure': 0.18; 'code.': 0.19;
'bug': 0.20; 'calls': 0.20; 'way.': 0.20; 'issue': 0.20; 'weeks':
0.22; "i've": 0.22; "i'd": 0.23; 'to:addr:python-list': 0.23;
'run': 0.24; 'code': 0.24; 'function': 0.28; 'module': 0.28;
'putting': 0.28; 'but': 0.31; 'empty': 0.32; 'to:name:python':
0.32; 'window': 0.32; 'message-id:@mail.gmail.com': 0.33; 'using':
0.33; 'received:209.85.166': 0.33; 'header:In-Reply-To:1': 0.33;
'hold': 0.34; 'same': 0.34; 'received:google.com': 0.34;
'from:addr:gmail.com': 0.35; 'possibly': 0.37; 'two': 0.37; 'way':
0.37; "that's": 0.37; 'special': 0.37; 'received:209.85': 0.38;
'those': 0.38; 'something': 0.38; 'received:209': 0.38; 'use':
0.38; 'put': 0.39; 'whether': 0.40; 'normal': 0.60; 'hope': 0.61;
'skip:o 10': 0.62; 'named': 0.63; 'your': 0.64; 'let': 0.65;
'opportunity': 0.67; 'etc,': 0.69; 'obvious': 0.69; 'piece': 0.69;
'caused': 0.71; 'production': 0.71; 'easy': 0.75; 'subject:skip:w
10': 0.77; '2021': 0.84; 'happen,': 0.84; 'shame': 0.91; 'trip,':
0.91
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
bh=8aR6SDeX2TXNAzSA2k33X0SMW+tX9k3P9IhgLWyRHAw=;
b=bYIUJ7Dk315hEnxuZzFE3eZTHgQ/+cd4mKE4MwfW1YtzNFa2LdU4OO7XR4PamH2kZ1
+ElJy+GNMOYvtos0+OcWxRZH25y/+R4Fez7FWaaSi/Ig+7a6/CEuzyV+DGSTVxdndpHk
8jas5oD/qeeDhwKFr9F9HPWaI51mgysCzkoYmhB7k66nnd5DJE5p4L2YkvDjnITW73pN
HKEYNz+1KK9ttGFGS5/HquySioOsEQK47L0pVqKw030bYmumJLJuY8MHpqZAtF35Qux3
sczQJXJg8mvyIWyEKnsSyVzlwdRFixqkZPHQwl9F2vOUuK2BIAblIhSoP+x4CqA4Rd13
Y/Pw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to;
bh=8aR6SDeX2TXNAzSA2k33X0SMW+tX9k3P9IhgLWyRHAw=;
b=bcYZrmt2OpF/i8YHv6kkXnI0FT8L5LASYs0LijBekqotlm40mLY0pNDbYEqNwJtk0Q
1AlK6wpkGkKWBBSRovi+ck8TnvMk2CYVEzS9AkuJDzNXFaJDGFZpvYXIO/1PPO18VoNB
SaurTdJ/PcerQ1iG0WU7TY5acQrQ8ERGau6Sdw7w8K7ElAcWGVKRqJWvb1f5NaOm0Ss4
DBSG8r1agGm+l2cqnog/LPguJQ8qlm6QM5jvaJR0p9YkvhfWOmlen7+AeJuUCtKMcs4P
wxuoW14q22f4/3keeOgAuqkhYtsFgJKO3drMwKjiJSoMrT8h37qs8GFo/KA9BefBttrb
A4ow==
X-Gm-Message-State: AOAM531OK9s0ZR/9hXW5I3kS8nMd7kEylGwzRhG8mC15MvNMmmkDNXQC
b+sAYMnZGWBI+n8v+phT5jjiwvx1WGu6Tf7gtXf/oJSD75E=
X-Google-Smtp-Source: ABdhPJxkjvJAY1VlhpA/2GgFMtZWSYDlZ/Ltyh6oafcW8QdrZJv4nT30/eji8MFlc7Ll7fnpAKqCZGBy3QM4quCI6V0=
X-Received: by 2002:a02:b685:: with SMTP id i5mr14795806jam.114.1622330752535;
Sat, 29 May 2021 16:25:52 -0700 (PDT)
In-Reply-To: <YLLINtUcjvqf4rdN@cskk.homeip.net>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <CAPTjJmqqr=jjxHeDFwH1V10an30j05698SzE8Bz7NqtCv2u9xg@mail.gmail.com>
X-Mailman-Original-References: <alpine.LNX.2.20.2105290945570.25842@salmo.appl-ecosys.com>
<YLLINtUcjvqf4rdN@cskk.homeip.net>
 by: Chris Angelico - Sat, 29 May 2021 23:25 UTC

On Sun, May 30, 2021 at 9:19 AM Cameron Simpson <cs@cskk.id.au> wrote:
>
> On 29May2021 09:51, Rich Shepard <rshepard@appl-ecosys.com> wrote:
> >I knew the debugging process with Fortran and C, but haven't learned how to
> >effectively use pdb to find bugs that don't issue a traceback or obvious
> >wrong answer such as my module displaying an empty window with no
> >widgets.
>
> I've only just started with pdb. As of Python 3.7 there's a builtin
> function named breakpoint() which drops you into the debugger. I've
> never been a big debugger person, historicly using print() and
> equivalent. However, this makes it very easy to insert this call into a
> piece of code instead of having to invoke one's pogramme in a special
> way.
>
> I'd imagine debugging is much like it is in C. Wait for the breakpoint
> to trip, then inspect the programme variables.
>

At its most fundamental level, debugging is the same regardless of the
language: make a bug happen, then see as much as you possibly can
about what caused it. Whether that's dumping print() calls through the
code or using a debug harness, the normal way to figure out what
code's doing is to see what your variables hold at different times.

Using something like gdb, pdb, etc, etc, is just a shorthand for
putting lots and LOTS of print calls into your code. So if you're not
comfortable with those tools, there's no shame in using the more
obvious/simple way of doing things!

(Plus, there's not always an opportunity to use a debug harness.
Sometimes you just have to put your prints into production and let it
run for two weeks in the hope that the bug will show itself.)

ChrisA

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor