From 2d38b5f59f0f25ad6949d1a189632a7071505409 Mon Sep 17 00:00:00 2001 From: Matt Quinn Date: Wed, 19 Feb 2025 13:28:51 -0500 Subject: [PATCH] chore: add debug profile + instructions to readme (#4494) After troubleshooting my failure to debug Relay using VSCode, I found that we had `debug` set to `false` in the dev profile. Added a note to the readme about it in case anyone else runs into the same issue. --------- Co-authored-by: Joris Bayer --- Cargo.toml | 6 ++++++ README.md | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index df589c838cc..4364c962e0e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,6 +8,12 @@ resolver = "2" # target folder, but we don't require stack traces in most cases. debug = false +[profile.dev-debug] +# A version of the dev profile with debug information enabled, for e.g. local +# debugging. +inherits = "dev" +debug = true + [profile.release] # In release, however, we do want full debug information to report # panic and error stack traces to Sentry. diff --git a/README.md b/README.md index 918628a5407..6402e9b8c83 100644 --- a/README.md +++ b/README.md @@ -183,6 +183,12 @@ make format make lint ``` +### Debugging + +Developer builds do not include debug information by default. If you want to +attach a debugger to your local Relay, you can use the provided `dev-debug` +profile instead with `cargo run --all-features --profile dev-debug`. + ### Python and C-ABI Potentially, new functionality also needs to be added to the Python package.