Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A convenient tracer and post-mortem debugger for code #352

Open
4 tasks done
KOLANICH opened this issue Dec 6, 2022 · 1 comment
Open
4 tasks done

A convenient tracer and post-mortem debugger for code #352

KOLANICH opened this issue Dec 6, 2022 · 1 comment
Labels
Advanced Projects that require a high level of understanding of the topics specified, or programming in gnrl. Developer tooling Help your fellow developers out by making their job a bit more enjoyable with good tooling. Extension/Plugin/Add-on Extend a product you enjoy, and make it even better! Much work This project takes little time to complete. (ETA several weeks+)

Comments

@KOLANICH
Copy link

KOLANICH commented Dec 6, 2022

Project description

Imagine an axis of time, where in the left is past and in the right is future.

A programmer runs a program under an instrumentation. On each control point the instrumenting code saves the state of the software. I mean the state of each variable that is needed to be traced. It'd require compiler/runtime assistance.

Only the needed modules and functions are instrumented.

The trace is delta-compressed and saved.

Then the programmer opens a trace in a plugin for a text editor/IDE (Kate, Qt Creator, Notepad++, VisualStudio). The IDE draws execution of code as a wire with markers on it.

For each marker a programmed can click on it and inspect program state as if he is debugging it.

There are sets of markers. Each set is either composed manually, or via a predicate. To add markers into a set programmatically the programmer writes a predicate in Python, that is evaluated by the plugin against each marker. The sets can be memoized into the on-disk file.

The IDE plugin has GUI to deal with sets. Each set must have a name and a few feature checkboxss.

  • visible - if the checkbox is not set, all markers within the set are hidden and the wire connecting them is "simplified" making it less detailed, and so creating less visual garbage
  • important - IDE GUI gets a pair of back-forward buttons for this set. Clicking the button allows to go to the next/previous node of that set quickly

The predicate API should allow introspecting the state, at least the following features should be available:

  • source file, line, column
  • currently executed expression path
  • currently execeted functiin name
  • mapping of variables within the scope to their types
  • changed variables relative to the previous state

The core dealing wuth the file formats, delta-compression and providing the framework to deal with the sets should be contained within a shared lib. Bindings to programming languages to write predicates should be contained within own shared libs. A yet another shared lib for GUI framework core. And a bunch of shared libs for editors used as plugins.

For instrumenting a plugin for a compiler or a library for interpreted language is needed. It uses the core library to collect traces.

Relevant Technology

Complexity and required time

Complexity

  • Advanced - The project requires the user to have a good understanding of all components of the project to contribute

Required time (ETA)

  • Much work - The project will take more than a couple of weeks and serious planning is required

Categories

  • Developer Tooling
  • Extension/Plugin/Add-On
@KOLANICH
Copy link
Author

KOLANICH commented Dec 6, 2022

@FredrikAugust FredrikAugust added Much work This project takes little time to complete. (ETA several weeks+) Advanced Projects that require a high level of understanding of the topics specified, or programming in gnrl. Developer tooling Help your fellow developers out by making their job a bit more enjoyable with good tooling. Extension/Plugin/Add-on Extend a product you enjoy, and make it even better! labels Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Advanced Projects that require a high level of understanding of the topics specified, or programming in gnrl. Developer tooling Help your fellow developers out by making their job a bit more enjoyable with good tooling. Extension/Plugin/Add-on Extend a product you enjoy, and make it even better! Much work This project takes little time to complete. (ETA several weeks+)
Projects
None yet
Development

No branches or pull requests

2 participants