Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cargo debug command #1726

Closed
vojtechkral opened this issue Jun 17, 2015 · 6 comments
Closed

Cargo debug command #1726

vojtechkral opened this issue Jun 17, 2015 · 6 comments
Labels
A-new-subcommand Area: new subcommand

Comments

@vojtechkral
Copy link
Contributor

It would be really nice if there were a command such as cargo gdb or cargo debug or similar that would do what cargo run does except run the program in a debugger. Having to do it manually is a bit cumbersome...

@alexcrichton
Copy link
Member

Unfortunately this would require there to be a cross-platform canonical solution to debugging Rust code, which currently doesn't exist. It could do "best-effort" things like running lldb on OSX and gdb on linux, but I'm not sure what the story on Windows would be. This sounds a lot like a custom subcommand rather than an official one currently.

@vojtechkral
Copy link
Contributor Author

On Windows, I believe windbg could be used in much the same manner as gdb, although I don't have a hands-on experience. The "best-effort" approach using gdb on Linux et al., lldb on OS X and windbg on Windows sounds good enough to me, but of course the call is yours...

@alexcrichton alexcrichton added the A-new-subcommand Area: new subcommand label Jun 17, 2015
@vojtechkral
Copy link
Contributor Author

Today I needed to trace a rust program with strace. People might also to run their programs wrapped in other tools, valgrind comes to mind, but there are surely others.

So maybe instead of adding a new subcommand, it would be better to add some kind of a "run-with-command" flag to cargo run ... ?

@vojtechkral
Copy link
Contributor Author

Or maybe third-party cargo-run-with program would do...

@stale
Copy link

stale bot commented Sep 20, 2018

As there hasn't been any activity here in a while would someone (the author, a team member, or any interested party) be able to summarise the current state, perhaps making explicit:

  • Is this still relevant?
  • If so, what is blocking it?
  • Is it known what could be done to help move this forward?

Thank you!

(The cargo team is currently evaluating the use of Stale bot, and using #6035 as the tracking issue to gather feedback.)

If you're reading this comment from the distant future, fear not if this was closed automatically. If you believe it's still an issue please leave a comment and a team member can reopen this issue. Opening a new issue is also acceptable!

@stale stale bot added the stale label Sep 20, 2018
@stale
Copy link

stale bot commented Oct 20, 2018

As I didn't see any updates in 30 days I'm going to close this. Please see the previous comment for more information!

@stale stale bot closed this as completed Oct 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-new-subcommand Area: new subcommand
Projects
None yet
Development

No branches or pull requests

2 participants