🌐
OnlineGDB
onlinegdb.com › online_python_compiler
Online Python Compiler - online editor
OnlineGDB is online IDE with python compiler. Quick and easy way to compile python program online. It supports python3.
🌐
OnlineGDB
onlinegdb.com
GDB online Debugger | Compiler - Code, Compile, Run, Debug online C, C++
/****************************************************************************** Welcome to GDB Online. GDB online is an online compiler and debugger tool for C, C++, Python, PHP, Ruby, C#, OCaml, VB, Perl, Swift, Prolog, Javascript, Pascal, COBOL, HTML, CSS, JS Code, Compile, Run and Debug ...
🌐
OnlineGDB
onlinegdb.com › SJJbWc-K8
GDB online Debugger | Code, Compile, Run, Debug online C, C++
''' Online Python Compiler. Code, Compile, Run and Debug python program online. Write your code in this editor and press "Run" button to execute it.
🌐
Python Tutor
pythontutor.com › python-compiler.html
Online Python compiler with AI assistant - visualize, debug, get help from AI tutors
This is the only Python website that lets you visually debug your code step-by-step and get free AI help.
🌐
OneCompiler
onecompiler.com › python › 4238pxuu4
gdb - Python - OneCompiler
Indentation is very important in Python, make sure the indentation is followed correctly
🌐
Python Developer's Guide
devguide.python.org › gdb
Python
You should have been redirected · If not, click here to continue
🌐
Python
wiki.python.org › moin › DebuggingWithGdb
DebuggingWithGdb - Python Wiki
A set of GDB macros are distributed with Python that aid in debugging the Python process. You can install them by adding the contents of Misc/gdbinit in the Python sources to ~/.gdbinit -- or copy it from Subversion.
🌐
Python Developer's Guide
devguide.python.org › development-tools › gdb
GDB support
You will most often set breakpoints ... as of Python 3.12. Fortunately, among the many ways to set breakpoints, you can break at C labels, such as those generated for computed gotos. If you are debugging an interpreter compiled with computed goto support (generally true, certainly when using GCC), each instruction will be prefaced with a label named TARGET_<instruction>, for example, TARGET_LOAD_CONST. You can then set a breakpoint with a command like: (gdb) break ...
🌐
YouTube
youtube.com › watch
Online Python Compiler | How to use Online Python Compiler | Online gdb | Programiz - YouTube
Online Python Compiler | How to use Online Python Compiler | Online gdb | Programiz | w3schools | Tutorials Point Learn more about Online Python Compiler vi...
Published   July 18, 2023
Find elsewhere
🌐
Pythononlinecompiler
pythononlinecompiler.net
Python Online Compiler - Interpreter & Debugger
Most platforms have user-friendly debuggers to help you understand what went wrong and how to fix it. Python or GDB (GNU Debugger) is a tool usually used for languages like C or C++, but you can also use the built-in debugger with Python.
🌐
Red Hat
developers.redhat.com › articles › 2021 › 09 › 08 › debugging-python-c-extensions-gdb
Debugging Python C extensions with GDB | Red Hat Developer
October 8, 2024 - GDB works as expected thanks to the new executable built without compiler optimizations. Python comes with a libpython3.9(...)-gdb.py gdb extension (implemented in Python) that adds GDB commands prefixed by py-. Expanding this prefix with the tab key shows the available commands:
🌐
Ubuntu Sources List Generator
mudongliang.github.io › 2017 › 08 › 12 › compile-gdb-with-python-script-support.html
Compile gdb with python script support
Compile gdb with python support · Test a simple python script · wget https://ftp.gnu.org/gnu/gdb/gdb-8.0.tar.gz · tar -xvf gdb-8.0.tar.gz cd gdb-8.0 ./configure --with-python make sudo make install ·
🌐
Undo
undo.io › home › gdb python integration: debugging with python in gdb
GDB Python Integration: Debugging with Python in GDB
June 3, 2025 - Master GDB Python integration for advanced debugging. Learn Python in GDB with our step-by-step guide.
🌐
GNU Project
sourceware.org › gdb › current › onlinedocs › gdb.html › Basic-Python.html
Basic Python (Debugging with GDB)
If throttle is not defined then there is no imposed limit on the maximum number of matches and breakpoints to be created. The symtabs keyword takes a Python iterable that yields a collection of gdb.Symtab objects and will restrict the search to those functions only contained within the gdb.Symtab objects.
🌐
Python documentation
docs.python.org › 3 › howto › gdb_helpers.html
Debugging C API extensions and CPython Internals with GDB — Python 3.14.2 documentation
This document explains how the Python GDB extension, python-gdb.py, can be used with the GDB debugger to debug CPython extensions and the CPython interpreter itself. When debugging low-level proble...
🌐
Medium
medium.com › @shiva.yarlagadda89 › online-gdb-python-235da3bf1d41
Online GDB Python. Online GDB is a popular online compiler… | by Shiva Yarlagadda | Medium
December 27, 2023 - Online GDB is a popular online compiler and debugger tool for various programming languages, including Python. It’s beneficial for writing, compiling, and debugging your code in a cloud-based environment.
🌐
Online Python
online-python.com › online_python_compiler
Online Python Compiler
Compile and Run your Python code instantly. Online-Python is a quick and easy tool that helps you to build, compile, test your python programs.
🌐
OnlineGDB
onlinegdb.com › online_python_debugger
Online Python Debugger - online editor
OnlineGDB is online IDE with python debugger. Easy way to debug python program online. Debug with online pdb console.
Top answer
1 of 4
13

FYI recent gdb versions are scriptable in Python. You can call python code from the gdb command line. This opens a whole new world, check the relevant documentation. From the command line run:

 dnf/yum/apt-get install gdb-doc
 info gdb extending python

If you do not like the text-based info browser, here is one (among many?) alternative, graphical browser:

yelp 'info:gdb' # , go to "Extending"

Here is a sample gdb-python script. It attaches gdb to the first "your_program" found running.

#!/usr/bin/python

import subprocess
import string

def backquotes(cmdwords):
        output = subprocess.Popen(cmdwords, stdout=subprocess.PIPE).communicate()[0]
        return output.strip()

pid = backquotes(['pgrep', 'your_program'])

gdb.execute("attach " + str(pid))
2 of 4
13

A reduced example that I'm currently using:

class DebugPrintingBreakpoint(gdb.Breakpoint):
    debugging_IDs = frozenset({37, 153, 420})
    def stop(self):
        top = gdb.newest_frame()
        someVector = top.read_var('aVectorVar')
        # Access the begin() & end() pointer of std::vector in GNU Standard C++ lib
        first = someVector['_M_impl']['_M_start']
        last = someVector['_M_impl']['_M_finish']
        values = []
        while first != last:
            values.append(int(first.dereference()['intID']))
            first = first + 1
        if not set(values) & debugging_IDs:
            return False # skip: none of the items we're looking for can be found by ID in the vector on the stack
        print("Found other accompanying IDs: {}".format(values))
        return True # drop to gdb's prompt
# Ensure shared libraries are loaded already
gdb.execute("start")
# Set our breakpoint, which happens to reside in some shared lib, hence the "start" previously
DebugPrintingBreakpoint("source.cpp:42")
gdb.execute("continue")

You can execute this script from gdb's prompt like this:

(gdb) source script.py

Or from the command-line:

$ gdb --command script.py ./executable.elf

See the complete GDB Python API docs for further info.