Questions tagged [pdb]

This tag refers to the Python debugger. For questions pertaining to the protein database file format, use the protein-database tag. For questions pertaining to Microsoft Program Database files, use the pdb-files tag.

The Python Debugger supports breakpoints, single stepping, inspection of stack frames, source code listing, and evaluation of arbitrary Python code in the context of any stack frame. It also supports post-mortem debugging and can be called under program control.

For questions pertaining to the protein database file format (.pdb), use the tag.

For questions pertaining to Microsoft "Program Database" (.pdb) files, use the tag.

880 questions
0
votes
1 answer

Python - Tracking one little script with `pdb`

Is it possible save the evolution of constants of a program, a small one indeed, in one file ? In other word, is there a way to store the informations sent by pdb? Suppose for example that we have the following code. a = 1 b = 2 a = a + b I would…
user1054158
0
votes
1 answer

pdb crashes web2py and left with a Abort Trap: 6 in the Terminal

It is pretty straight forward I run the python web2py.py in terminal (mac ox lion) and go to my controller. Before I had code which I thought was doing it, but now I only have a this left in my code and I'm still getting the problem: def login(): …
Sententia
  • 625
  • 1
  • 6
  • 17
0
votes
3 answers

Download a Fasta file and write it into a text file

I am using this code to download a fasta sequence file from the pdb website. The pdb id is the string protid. import java.io.*; import java.net.URL; import java.util.Scanner; public class Trialoffile { public static void main(String[] args){ …
user1954680
  • 23
  • 1
  • 5
0
votes
1 answer

How do I tell pdb.run to use my current imports when running from a shell?

I want to start a pdb session from the Python shell on a function using pdb.run(). I know that I can give it a globals or a locals parameter, but I don't know what values to pass so that I keep all of my current imports in the debugger…
Mihai Oprea
  • 2,051
  • 3
  • 21
  • 39
0
votes
1 answer

django tutorial part 2 template opening from default only

My setting for TEMPLATE_DIRS is PATH_PROJECT = os.path.abspath(os.path.dirname(__file__)) TEMPLATE_DIRS = ( os.path.join(PATH_PROJECT, 'mytemplates/'), ) but the base_site.html opens from the default position…
Shh
  • 986
  • 9
  • 18
0
votes
1 answer

Python PDB set_trace not working

The program stops properly where expected, but I don't get the pdb prompt. Hitting "c" continues the program as expected. I've checked stdout and it's fine.
Finch_Powers
  • 2,938
  • 1
  • 24
  • 34
0
votes
1 answer

Calling pdb.set_trace from script invoked from os.system

I want to debug a python script which is invoked via os.system() from another python script. I tried calling pdb.set_trace from the invoked code but it doesn't work. I can't see the Python pdb prompt. Its sort of automation framework. My final…
0
votes
1 answer

Where do I put Microsoft.Scripting.Debugging so that our embedded interpreter can find it?

I am trying to debug a function I've written, and it is not possible to run it in the regular IronPython interpreter because of all the jiggery pokery we do when we start up the one we've embedded in our application. However when I try and run the…
Matt Ellen
  • 11,268
  • 4
  • 68
  • 90
-1
votes
0 answers

Keyboard short cut for executing expressions in the integerated terminal in Vscode

I am using VScode on Ubuntu 20.04 for Python development, I use breakpoint() for debugging, when the script enter in debugging mode, I copy commands from the text editor and paste it to integrated terminal windows for debugging. Is there any…
Amir saleem
  • 1,404
  • 1
  • 8
  • 11
-1
votes
1 answer

What does 'File ""' stands for on python debugger and traceback?

Eventually, when I am in a debug session, the current file is named "". What I would expect to see is the name of the module where the debugger is currently on. The same happens on the traceback: Traceback (most recent call last): ... …
-1
votes
1 answer

Count the number of atoms of each element

I have to access a file and count the number of atoms of each element. That is, count the number of times of the last character. For example, I have a file named 14ly.pdb with the following lines: ATOM 211 N TYR A 27 4.697 8.290 -3.031 1.00 13.35…
Angy Mara
  • 1
  • 1
-1
votes
2 answers

How to resume execution of Python code after crash?

When my python code crashes, I'd like to be able to pause, quickly type some python code that would fix the error, then resume execution. Is it possible to run it in some type of pdb mode that sets a trace on crash before the stack is cleared, or…
John Targaryen
  • 1,109
  • 1
  • 13
  • 29
-1
votes
1 answer

how to run pdb in a nested loop in python

I have a nested loop as shown below, for num in range(10,20): #to iterate between 10 to 20 for i in range(2,num): #to iterate on the factors of the number if num%i == 0: #to determine the first factor j=num/i …
-1
votes
2 answers

Why I'm getting this error when I import pdb? 'module' object has no attribute 'ascii_letters'

Trying to debug my code, I'm importing the library pdb import sys from subprocess import check_call import pdb /*functions*/ if __name__== "__main__": /* Code */ I'm receiving this error: File "reg.py", line 11, in import pdb …
Shinomoto Asakura
  • 1,473
  • 7
  • 25
  • 45
-1
votes
1 answer

debug child process running under control of entr

I'm trying to find a way to use remote_pdb and entr together as an environment for rapid testing and development of Python 3 multiprocessing applications, but they're not playing nicely together. Consider the trivial test case below: import…
Mike Ellis
  • 1,120
  • 1
  • 12
  • 27
1 2 3
58
59