← all repositories
ericjang/tdb

GDB for TensorFlow: debugging graphs node by node

A visual debugger that lets you set breakpoints inside a TensorFlow graph and step through execution like it's 1975.

1.4k stars JavaScript ML FrameworksLLMOps · Eval
tdb
Not currently ranked — collecting fresh signals.
star history

What it does TDB is a Python library plus Jupyter extension that wraps TensorFlow with interactive debugging. You set breakpoints on ops or tensors, pause execution, inspect values, and resume with tdb.c() or step forward with tdb.s(). It also streams live Matplotlib plots—histograms, loss curves, whatever you define—while the network trains.

The interesting bit The README’s own analogy is apt: TDB is to TensorBoard as GDB is to printf. Where TensorBoard requires you to finish a run and read logs, TDB hijacks the live graph execution and lets you inject arbitrary Python functions as first-class nodes. You can literally drop a Python myadd function between TensorFlow ops and it becomes part of the computational graph.

Key highlights

  • Breakpoints on individual ops/tensors with tdb.debug(), tdb.c(), tdb.s()
  • Real-time arbitrary Matplotlib plots via tdb.plot_op() without stopping training
  • User-defined Python ops that accept tf.Tensor inputs and output placeholders
  • Jupyter notebook extension for frontend visualization
  • Apache 2.0 licensed

Caveats

  • Explicitly unmaintained; the author points to official tfdbg as the successor
  • Plotting backend locked to Matplotlib; promised Seaborn/Bokeh/Plotly support never arrived
  • Setup requires manual zip download and notebook.nbextensions fiddling

Verdict Worth studying if you’re building debugging tools for ML frameworks, or if you’re stuck maintaining legacy TensorFlow 1.x code. Everyone else should use the official TensorFlow Debugger or modern equivalents.

Frequently asked

What is ericjang/tdb?
A visual debugger that lets you set breakpoints inside a TensorFlow graph and step through execution like it's 1975.
Is tdb open source?
Yes — ericjang/tdb is open source, released under the Apache-2.0 license.
What language is tdb written in?
ericjang/tdb is primarily written in JavaScript.
How popular is tdb?
ericjang/tdb has 1.4k stars on GitHub.
Where can I find tdb?
ericjang/tdb is on GitHub at https://github.com/ericjang/tdb.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.