• Stars
    star
    1,338
  • Rank 35,129 (Top 0.7 %)
  • Language
    JavaScript
  • License
    Other
  • Created almost 12 years ago
  • Updated over 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A pretty darn cool JavaScript debugger for Brackets

Theseus

Theseus is a new type of JavaScript debugger for Node.js, Chrome, and both simultaneously. It is an extension for the Brackets code editor.

Theseus is part of a collaboration between the User Interface Design Group at MIT CSAIL and Adobe Research. Though it's a research project, I'm doing the best I can engineering-wise and I'm responsive to bug reports and feature requests. Patches welcome!

Screenshot of Theseus

Features

Real-time code coverage: Theseus shows the number of times that every function has been called next to its definition. Functions that have never been called are also given a gray background. You can watch the code light up as you interact with the web page.

Screenshot of call counts and dead code coloring

Retroactive inspection: Click a call count to see the values of parameters, return values, and any exceptions that have been thrown from that function. It's like adding console.log without having to save and reload.

Screenshot of a single function being logged

Asynchronous call tree: If you click multiple call counts, all invocations of those functions are shown in a tree. When callback functions are called, they show up in the tree under the function that created them, regardless of whether they were called immediately or many ticks later.

Screenshot of multiple functions being logged

Install

  1. Install Brackets Sprint 28 or later.
  2. In Brackets, click the menu item File > Extension Manager...
  3. Go to the "Available" tab of the dialog that appears.
  4. Type "Theseus" in the search box.
  5. Click the "Install" button in the search result for Theseus.

For Node.js support, also run npm install -g node-theseus in a terminal to get the command-line helper. Theseus requires node-theseus 0.2.x.

Usage: Debug JavaScript running in Node.js

Brackets + Node.js

Start your program by running node-theseus app.js (instead of node app.js as you normally would). Theseus will automatically connect to that process.

(You install node-theseus with npm install -g node-theseus)

node-theseus download statistics

Usage: Debug JavaScript running in Chrome

Brackets + Chrome

Open the File menu and put Theseus into the mode for static HTML files:

Brackets + Chrome

Then open an HTML file and start Brackets' Live Development mode by clicking the lightning bolt in the top right corner of the window:

Brackets' lightning bolt

Your page will open in Chrome.

A Handful of Technical Details

Node.js: Files with paths containing node_modules will not be instrumented.

Chrome: Files requested with the URL parameter theseus=no (for example, <script src="script.js?theseus=no" />) will not be instrumented.

Any file containing the (exact) string /*theseus instrument: false */ will not be instrumented by Theseus. You can also use the --theseus-exclude=filename option with node-theseus (which also has some other options that you might find helpful).

Bugs

First, there's a whole wiki page about troubleshooting Theseus. Check it out!

If you come across a bug, submit an issue on GitHub. Include a list of steps we can follow to reproduce the problem, a description of what you saw that seemed broken, and a description of what you expected to see.

Mailing List

Announcements and discussion: https://groups.google.com/d/forum/theseus-discuss

Contributing/Extending

Theseus is a constellation of Node.js modules working together. For contributors, there's a detailed description of how Theseus works, but below is a list of all the modules that you can use to create similar (or dissimilar!) projects.

Patches to any of these projects are welcome. I'll even help you figure out how to do something that doesn't make sense to merge but still deserves to exist.

Theseus, the Brackets extension

JavaScript trace collection

  • adobe-research/fondue: JavaScript instrumentation library. Rewrites JavaScript code so that when it runs, it saves a trace of everything that happened. Theseus uses fondue's API over WebSockets or Brackets' Live Development connection, depending on the context.
  • alltom/fondue-middleware: a connect middleware that processes all JavaScript in .js and .html files with fondue

JavaScript source rewriting

Prototypes

Contributors

  • @alltom. Primary developer.
  • @nhynes. Automatic upgrades, bug-fixes.
  • @MarcelGerber. Made the UI translatable and added German translation.
  • @joelrbrandt. Added the menu item for enabling and disabling Theseus.
  • @larz0. Made Theseus match Brackets' visual style.
  • @jasonsanjose. Sprint 30 compatibility, Edge Code compatibility.
  • @benchuk. Redirect requests to files in /public to root.

Also thanks to the whole Brackets team, and to @alltom's mentors, @rcmiller and @joelrbrandt!

License

Theseus is released under the MIT license.

More Repositories

1

custom-diffusion

Custom Diffusion: Multi-Concept Customization of Text-to-Image Diffusion (CVPR 2023)
Python
1,835
star
2

MakeItTalk

Jupyter Notebook
481
star
3

DeepAFx-ST

DeepAFx-ST - Style transfer of audio effects with differentiable signal processing. Please see https://csteinmetz1.github.io/DeepAFx-ST/
Python
364
star
4

spindle

Next-generation web analytics processing with Scala, Spark, and Parquet.
JavaScript
331
star
5

diffusion-rig

Code Release for DiffusionRig (CVPR 2023)
Python
259
star
6

MetaAF

Control adaptive filters with neural networks.
Python
221
star
7

DeepAFx

Third-party audio effects plugins as differentiable layers within deep neural networks.
Jupyter Notebook
185
star
8

ActionScript4

ActionScript 4 specification archive
TeX
182
star
9

sam_inversion

[CVPR 2022] GAN inversion and editing with spatially-adaptive multiple latent layers
Python
169
star
10

affordance-insertion

Python
135
star
11

MagicFixup

Python
134
star
12

convmelspec

Convmelspec: Convertible Melspectrograms via 1D Convolutions
Python
131
star
13

VideoDoodles

Python
119
star
14

fondue

JavaScript instrumentation library for collecting traces
JavaScript
110
star
15

libkafka

A C++ client library for Apache Kafka v0.8+. Also includes C API.
C++
89
star
16

domain-expansion

Domain Expansion of Image Generators - CVPR23
Python
86
star
17

deft_corpus

The Definition Extraction From Text corpus and relevant formatting scripts
Python
79
star
18

node-theseus

JavaScript
76
star
19

GCview

GC / memory management visualization and monitoring framework.
JavaScript
73
star
20

vaw_dataset

This repository provides data for the VAW dataset as described in the CVPR 2021 paper titled "Learning to Predict Visual Attributes in the Wild" and the ECCV 2022 paper titled "Improving Closed and Open-Vocabulary Attribute Prediction using Transformers"
Python
61
star
21

svgObjectModelGenerator

SVG OM Generator & Writer
JavaScript
49
star
22

spark-parquet-thrift-example

Example Spark project using Parquet as a columnar store with Thrift objects.
Scala
48
star
23

spark-cluster-deployment

Automates Spark standalone cluster tasks with Puppet and Fabric.
Python
43
star
24

EntitySeg-Dataset

Adobe-EntitySeg dataset
39
star
25

spark-gpu

GPU Acceleration for Apache Spark
Python
34
star
26

layered-depth-refinement

Python
32
star
27

auto-wire-removal

28
star
28

sunstage

Python
28
star
29

deep-acoustic-analysis

Python
26
star
30

mesh

General-purpose programming language featuring functional idioms, strong static inferred types, and a concurrency model built on managed mutability and STM.
26
star
31

AutoToon

Python
25
star
32

VideoSham-dataset

22
star
33

CHART-Synthetic

Synthetic Dataset used in the ICDAR2019 Competition on HArvesting Raw Tables from Infographics (CHART-Infographics)
Python
19
star
34

DiffusionHandles

Diffusion Handles is a training-free method that enables 3D-aware image edits using a pre-trained Diffusion Model.
Python
15
star
35

Cross-lingual-Test-Dataset-XTD10

13
star
36

beacon-aug

Cross-library augmentation toolbox supporting 300 operators over 8 libraries + AI transforms
Jupyter Notebook
12
star
37

UniHuman

Python
12
star
38

audio-retargeting

C
11
star
39

prometheus-opentsdb-exporter

A Prometheus exporter component for OpenTSDB
Scala
10
star
40

cross-preferences

Java Preferences SPI implementations backed by distributed configuration stores (web API included)
Java
8
star
41

aesop

AESOP: Abstract Encoding of Stories, Objects and Pictures
Python
7
star
42

meetingqa

Python
7
star
43

mississippi

Mississippi is a Python package that runs batch jobs in the Amazon Web Services (AWS) environment.
6
star
44

http_streaming_client

Ruby HTTP client with support for HTTP 1.1 streaming, GZIP compressed streams, and chunked transfer encoding. Includes extensible OAuth support for the Adobe Analytics Firehose and Twitter Streaming APIs.
Ruby
6
star
45

DocEdit-Dataset

Release of the DocEdit Dataset associated with the AAAI 2023 paper "DocEdit: Language-guided Document Editing"
5
star
46

longmoment-detr

Python
5
star
47

llava-score

Python
4
star
48

LexDeMod

3
star
49

pdftriage

Python
2
star
50

hw_with_style

Python
2
star
51

AutoForecast_ResourceUsageData

2
star
52

ASWValData

Jupyter Notebook
1
star
53

Extract-AI

Python
1
star