feat(lsp): add debugOverrideCommand option#22236
Open
shorwood wants to merge 1 commit intorust-lang:masterfrom
Open
feat(lsp): add debugOverrideCommand option#22236shorwood wants to merge 1 commit intorust-lang:masterfrom
debugOverrideCommand option#22236shorwood wants to merge 1 commit intorust-lang:masterfrom
Conversation
This comment has been minimized.
This comment has been minimized.
a7a3150 to
0e6e8b5
Compare
Collaborator
|
☔ The latest upstream changes (possibly #22284) made this pull request unmergeable. Please resolve the merge conflicts. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #22128
Adds
debugOverrideCommandfor test and bench runnables so debug can use a different command from Run. This is needed for runners like nextest, where running a test and debugging a test require different command shapes.The setting is opt-in. Existing
overrideCommand, Cargo debug config generation, and matchinglaunch.jsonentries keep their current behavior.For reference, here's my setup with this PR active.
{ "rust-analyzer.server.path": "$HOME/Workspaces/rust-analyzer/target/debug/rust-analyzer", "rust-analyzer.runnables.test.overrideCommand": [ "nix", "shell", "nixpkgs#cargo-nextest", "-c", "cargo", "nextest", "run", "--config", "profile.dev.debug=2", "--package", "${package}", "${target_arg}", "${target}", "--", "${test_name}", "${exact}", "${include_ignored}" ], "rust-analyzer.runnables.test.debugOverrideCommand": [ "nix", "shell", "nixpkgs#cargo-nextest", "-c", "cargo", "nextest", "run", "--config", "profile.dev.debug=2", "--package", "${package}", "${target_arg}", "${target}", "--debugger", "$HOME/.vscode/extensions/vadimcn.vscode-lldb-1.12.1/bin/codelldb-launch --connect 127.0.0.1:12345 --", "--", "${test_name}", "${exact}", "${include_ignored}" ], "rust-analyzer.runnables.extraEnv": { "CODELLDB_LAUNCH_CONFIG": "{ token: 'secret' }" }, "lldb.rpcServer": { "host": "127.0.0.1", "port": 12345, "token": "secret" } }