Function compute_vscode_args

Source
pub fn compute_vscode_args(sample: &CargoTarget) -> (String, Option<String>)
Expand description

Computes the arguments for VSCode given a sample target. Returns a tuple (folder_str, goto_arg).

  • folder_str is the folder that will be opened in VSCode.
  • goto_arg is an optional string of the form “<file>:<line>:<column>” determined by searching for “fn main” in the candidate file.

For extended samples, it checks first for “src/main.rs”, then “main.rs”. For non-extended examples, it assumes the file is at “examples/<name>.rs” relative to cwd.