All Projects → cbourjau → Cargo With

cbourjau / Cargo With

Licence: gpl-3.0
A third-party cargo extension to run the build artifacts through tools like `gdb`

Programming Languages

rust
11053 projects

Labels

Projects that are alternatives of or similar to Cargo With

Viztracer
VizTracer is a low-overhead logging/debugging/profiling tool that can trace and visualize your python code execution.
Stars: ✭ 874 (+1549.06%)
Mutual labels:  debugging
Dbgbench.github.io
DBGBench Website:
Stars: ✭ 11 (-79.25%)
Mutual labels:  debugging
Android Debug Database
A library for debugging android databases and shared preferences - Make Debugging Great Again
Stars: ✭ 7,946 (+14892.45%)
Mutual labels:  debugging
Pegviz
PEG trace visualizer
Stars: ✭ 18 (-66.04%)
Mutual labels:  debugging
Video Containers Debugging Tools
A set of command lines to debug video streaming files like mp4 (MPEG-4 Part 14), ts (MPEG-2 Part 1), fmp4 in Dash, HLS, or MSS, with or without DRM.
Stars: ✭ 27 (-49.06%)
Mutual labels:  debugging
Requestdiff
Send two HTTP requests and visualize any differences
Stars: ✭ 28 (-47.17%)
Mutual labels:  debugging
Hardhat
Hardhat is a development environment to compile, deploy, test, and debug your Ethereum software. Get Solidity stack traces & console.log.
Stars: ✭ 727 (+1271.7%)
Mutual labels:  debugging
Bugsnag Node
[DEPRECATED] Please upgrade to our Universal JS notifier "@bugsnag/js" • https://github.com/bugsnag/bugsnag-js
Stars: ✭ 48 (-9.43%)
Mutual labels:  debugging
Debug kit
Debug Toolbar for CakePHP applications.
Stars: ✭ 858 (+1518.87%)
Mutual labels:  debugging
Bpf Map
Generic tool to inspect BPF maps
Stars: ✭ 38 (-28.3%)
Mutual labels:  debugging
Unitydbgdraw
DbgDraw is an API that provides the ability to render various 2D and 3D shapes for visual debugging purposes.
Stars: ✭ 20 (-62.26%)
Mutual labels:  debugging
Dpcwait
Driver demonstrating how to register a DPC to asynchronously wait on an object
Stars: ✭ 27 (-49.06%)
Mutual labels:  debugging
Hmlldb
HMLLDB is a collection of LLDB commands to assist in the debugging of iOS apps.
Stars: ✭ 30 (-43.4%)
Mutual labels:  debugging
Eylogviewer
A simple viewer to see your app's logs on your iDevice in realtime.
Stars: ✭ 16 (-69.81%)
Mutual labels:  debugging
Lucid
A simple mock-application for programs that work with child processes
Stars: ✭ 45 (-15.09%)
Mutual labels:  debugging
Bugsnag Laravel
Bugsnag notifier for the Laravel PHP framework. Monitor and report Laravel errors.
Stars: ✭ 746 (+1307.55%)
Mutual labels:  debugging
Babel Plugin Debug Macros
Stars: ✭ 14 (-73.58%)
Mutual labels:  debugging
Utils
Docker image with tools like curl, wget, ping, nslookup, dig, psql etc.
Stars: ✭ 49 (-7.55%)
Mutual labels:  debugging
Power trace
Buff exception backtrace with local variables, passed in arguments and instance variables!
Stars: ✭ 48 (-9.43%)
Mutual labels:  debugging
Bugsnag Android
Bugsnag crash monitoring and reporting tool for Android apps
Stars: ✭ 990 (+1767.92%)
Mutual labels:  debugging

cargo-with

cargo-with is a cargo-subcommand making it easy to run the build artifacts produced by cargo run, cargo build or cargo bench through other tools such as gdb, strace, valgrind, rr, or whatever else you may come up with.

Build Status crates.io

Installation

Install with the usual cargo install magic:

cargo install cargo-with

Usage

The core idea of cargo-with is to fit well into your development workflow using cargo <subcommand>. All you have to do is add with <some-command> -- in front of your usual cargo commands. cargo-with will then try it's best to identify the created artifact and run it with your command.

E.g. in order to run your binary through gdb do:

cargo with gdb -- run

This will firstly build the binary using cargo build, and then run gdb {bin} {args}, where {bin} is the path to the produced artifact and {args} is the arguments provided to cargo after the last -- (in this case none).

Moving arguments around

Instead of implicitly appending the artifact path and arguments to the provided command, you could also use placeholders to tell cargo-with where to place them. This can be done by using {bin} and {args} in the provided command.

cargo with "echo {args} {bin}" -- run -- --argument1 --argument2

I the above command, {bin} will be replaced by the path to the built artifact while {args} will be replaced by --argument1 --argument2.

Disambiguating multiple binaries

There are often mulitiple candiate artifacts when cargo builds your project, especially when building tests. Therefore cargo-with may in some situations need more information to select your preferred candidate. This is done via explicitly specificing to cargo which artifact to build through the use of --bin <name-of-binary>, --example <name-of-example>, --lib <name-of-lib>* or --test <name-of-unit-test>*.

cargo with "gdb --args {bin} {args}" -- test --bin my-app
cargo with "gdb --args {bin} {args}" -- test --lib my-library
cargo with "gdb --args {bin} {args}" -- test --test my-unit-test
cargo with "gdb --args {bin} {args}" -- test --example my-example

*Only avaliable when using cargo test

Examining tests

Cargo will run tests in parallel, hence running cargo with gdb -- test --lib my-library is probably not what you want. You can examine a single test by giving the name of the test function to cargo; cargo with gdb -- test --lib my-library my_test_function_name.

Note about cargo run

In the case of cargo run cargo-with does replace run with build implicitly in order to avoid execution of the binary after compilation.

Future of this crate

There are currently open issues upstream in cargo which might make this crate redundant in the future.

Contributors

This crate would not be what it is today without the many contributions by @barskern!

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].