All Projects → inspector-repl → Inspector

inspector-repl / Inspector

Licence: other
A drop-anywhere C++ REPL

Programming Languages

cpp17
186 projects

Projects that are alternatives of or similar to Inspector

gdbundle
Minimalist plugin manager for GDB and LLDB
Stars: ✭ 72 (-90.61%)
Mutual labels:  gdb, lldb
Indium
A JavaScript development environment for Emacs
Stars: ✭ 1,058 (+37.94%)
Mutual labels:  inspector, repl
Gdbprofiler
Rich man's profiler, a profiler for native OCaml and other executables
Stars: ✭ 75 (-90.22%)
Mutual labels:  gdb, lldb
Lldb
Project moved to: https://github.com/llvm/llvm-project
Stars: ✭ 412 (-46.28%)
Mutual labels:  gdb, lldb
slyblime
Interactive Lisp IDE with REPL, Inspector, Debugger and more for Sublime Text 4.
Stars: ✭ 35 (-95.44%)
Mutual labels:  repl, inspector
lldbg
A lightweight native GUI for LLDB.
Stars: ✭ 83 (-89.18%)
Mutual labels:  gdb, lldb
Code Debug
Native debugging for VSCode
Stars: ✭ 232 (-69.75%)
Mutual labels:  gdb, lldb
OpenImageDebugger
An advanced in-memory image visualization plugin for GDB and LLDB on Linux, MacOS and Windows (experimental). Previously known as gdb-imagewatch.
Stars: ✭ 115 (-85.01%)
Mutual labels:  gdb, lldb
Nvim Gdb
Neovim thin wrapper for GDB, LLDB, PDB/PDB++ and BashDB
Stars: ✭ 341 (-55.54%)
Mutual labels:  gdb, lldb
Voltron
A hacky debugger UI for hackers
Stars: ✭ 5,599 (+629.99%)
Mutual labels:  gdb, lldb
Nrepl
A Clojure network REPL that provides a server and client, along with some common APIs of use to IDEs and other tools that may need to evaluate Clojure code in remote environments.
Stars: ✭ 475 (-38.07%)
Mutual labels:  repl
Red
Red is a next-generation programming language strongly inspired by Rebol, but with a broader field of usage thanks to its native-code compiler, from system programming to high-level scripting and cross-platform reactive GUI, while providing modern support for concurrency, all in a zero-install, zero-config, single 1MB file!
Stars: ✭ 4,725 (+516.04%)
Mutual labels:  repl
Readline Sync
Synchronous Readline for interactively running to have a conversation with the user via a console(TTY).
Stars: ✭ 601 (-21.64%)
Mutual labels:  repl
Rr
Record and Replay Framework
Stars: ✭ 6,469 (+743.42%)
Mutual labels:  gdb
Aframe Inspector
🔍 Visual inspector tool for A-Frame. Hit *<ctrl> + <alt> + i* on any A-Frame scene.
Stars: ✭ 469 (-38.85%)
Mutual labels:  inspector
Spector.js
Explore and Troubleshoot your WebGL scenes with ease.
Stars: ✭ 599 (-21.9%)
Mutual labels:  inspector
Projectvisbug
FireBug for designers › Edit any webpage, in any state https://a.nerdy.dev/gimme-visbug
Stars: ✭ 4,694 (+511.99%)
Mutual labels:  inspector
Mcclim
An implementation of the Common Lisp Interface Manager, version II
Stars: ✭ 461 (-39.9%)
Mutual labels:  inspector
Libheap
python library to examine ptmalloc (the glibc userland heap implementation)
Stars: ✭ 453 (-40.94%)
Mutual labels:  gdb
Bic
A C interpreter and API explorer.
Stars: ✭ 719 (-6.26%)
Mutual labels:  repl

Inspector - A drop-anywhere C++ REPL

Build Status

Allows to inject a fully-functional C++17 REPL into running, compiled programs that can access your program state and offers features like code-completion and syntax highlighting.

The API is similar to tools like Pry in Ruby or Pdb in Python:

Example program:

// save as main.cpp
#include <iostream>
#include <string>

int main(int argc, char** argv) {
    int a = 1;
    std::string b = "hello world";
#include INSPECTOR
    std::cout << "second break." << std::endl;
#include INSPECTOR
}
$ ./inspector prebuild main.cpp 
$ clang++ $(./inspector print-cflags) main.cpp -o main 
$ ./inspector repl
$ ./main

Inspector example session

Presentation slides on Inspector

10 min video presentation on Inspector

Cppcast about Inspector

Build

Requirements

  • a c++ compiler (gcc or clang++)
  • libcling (see installation instructions below)
  • jsoncpp
  • python3
  • python-prompt-toolkit (for python3)
  • python-setuptools (for python3)
  • pkg-config

Build Cling

Note that for some linux distributions the cling project also provide pre-build binaries.

git clone http://root.cern.ch/git/llvm.git src
cd src
git checkout cling-patches
cd tools
git clone http://root.cern.ch/git/cling.git
git clone http://root.cern.ch/git/clang.git
cd clang
git checkout cling-patches
cd ../..
mkdir build inst
cd build
cmake -DCMAKE_INSTALL_PREFIX=../inst ..
cmake --build .
cmake --build . --target install

Build Inspector

git clone [email protected]:inspector-repl/inspector.git
cd inspector
mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH="../inst" ..
cmake --build .

Usage

# bring python bindings
# (requires clang 5/trunk for python3 support, the clang branch from cling is new enough)
# and libclang into path
export PYTHONPATH=$(readlink -f <llvm-root>/src/tools/clang/bindings/python/)
export LD_LIBRARY_PATH=$(readlink -f <llvm-repo>/inst/lib)
cd build
./inspector prebuild ../test/test.cpp
gcc -o test-proc $(./inspector print-cflags) ../test/test.cpp
# start repl cli
./inspector repl
# let program connect to repl
./test-proc

TODO

  • [ ] buildsystem integration:
    • [ ] cmake
    • [ ] autotools
    • [ ] make
    • [ ] meson
  • [ ] include type declaration into the repl
  • [ ] search for '#include INSPECTOR' before parsing (speed)
  • [ ] use verbose mode of compiler to get additional include paths for cling / libclang parsing
  • [ ] multiprocessing scanning
  • [ ] GDB/LLDB plugin: link/preload libinspector.so and invoke inspector with debug information from gdb/lldb.
  • Support for more languages:
    • [ ] C
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].