How to debug a Cargo Command configuration in clion?

  Kiến thức lập trình

I want to debug a rust program in clion.

There is no problem executing command line binaries?
enter image description here

(base) williamlee@MacBook-Pro control_plane % ./neon_local tenant create --help
Usage: neon_local tenant create [OPTIONS]

Options:
      --tenant-id <tenant-id>
          Tenant id. Represented as a hexadecimal string 32 symbols length
      --timeline-id <timeline-id>
          Use a specific timeline id when creating a tenant and its initial timeline
  -c <config>
          
      --pg-version <pg-version>
          Postgres version to use for the initial tenant [default: 15]
      --set-default
          Use this tenant in future CLI commands where tenant_id is needed, but not specified
      --shard-count <shard-count>
          Number of shards in the new tenant (default 1)
      --shard-stripe-size <shard-stripe-size>
          Sharding stripe size in pages
      --placement-policy <placement-policy>
          Placement policy shards in this tenant
  -h, --help
          Print help

In the clion debug code, it works without adding parameters.

enter image description here

add parameters,

enter image description here

enter image description here

I checked the official website tutorial and I feel that the configuration is correct.
enter image description here

I expect the code can be debugged normally in clion

LEAVE A COMMENT