Skip to content

Investigating errors

Sven Nilsen edited this page Sep 20, 2015 · 2 revisions

Sometimes there is a weird problem that requires a bit of investigation.

If you suspect there is a problem with some of the window/graphics back-ends, then you can swap out one with another and see if the problem persists. This is useful to narrow down search space.

You can create a git branch and add print statements, or change the code to see what happens. To test changes to a library with another application, override the dependency locally using Cargo.

Overriding dependencies locally using Cargo

Here is how you do it:

  1. Create a new file under ~/.cargo called config.
  2. Add paths = ["/path/to/dependency/to/override", ...]

You can use multiple lines and # to comments out a dependency.

Example:

paths = [
    # "/path/to/dependency/to/override",
    ...
]

Don't forget to check ~/.cargo/config for accidental overriding.

Clone this wiki locally