Skip to content

Conversation

UebelAndre
Copy link
Collaborator

This change introduces //tools/vscode which includes tools for vscode integrations. Separate from //tools/rust_analyzer, this new package includes a gen_launch_json target which can be used to generate "Run and Debug" tasks for rust_binary and rust_test targets.

closes #370

@UebelAndre UebelAndre force-pushed the debug branch 6 times, most recently from e90ac2a to afad691 Compare October 15, 2025 21:03
@UebelAndre UebelAndre marked this pull request as ready for review October 15, 2025 21:05
.unwrap_or_else(|_| panic!("couldn't open {:?}", &launch_json_path));

// Verify basic JSON structure
assert!(content.contains(r#""version": "0.2.0""#));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be tempted to actually parse the JSON here rather than doing string asserts, but also recognise going from 0 to non-0 dependencies is annoying

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


/// Don't pretty print generated JSON
#[arg(long)]
no_pretty: bool,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe pretty with default true, rather than default negation?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does clap support this?

}

/// Query information about a specific target.
pub fn query_target_info(&mut self, target: &str) -> Result<TargetInfo> {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAICT this is unused?

I was going to ask why we need both this and find_rust_targets, but I suspect the answer is we don't?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, deleted!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FR: Debugger setup in vscode

2 participants