Improve Windows debugger launcher - #162620
fgiancane8 wants to merge 1 commit into
Conversation
|
Thanks for the pull request, and welcome! The Rust Project has assigned @Mark-Simulacrum (or someone else) to review your changes, you should hear from them (or someone else) within the next two weeks. Please see the contribution instructions and our LLM policy for more information. Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
Prefer windbgx when available, fall back to windbg, propagate the debugger exit status, and report a clear error when neither debugger is found.
ba9caf6 to
e740c2d
Compare
|
Is the cmd script actually useful now that natvis files are embedded in the pdbs? |
|
Good catch. Probably it is now automatically managed by WinDbgX configuration but I haven't checked. |
|
I think the cmd scripts should be considered deprecated as they're now redundant. We could also consider removing them but if we do that we should emit a deprecation warning first. |
Thanks for the inputs. Should I update this pull request with a deprecation warning/message first, or shall we just ignore it here? |
|
r? ChrisDenton cc @Walnut356 |
While testing a trivial Rust application on my Windows machine, I discovered that
rust-windbg.cmdcould only launchwindbg(legacy Windows debugger), could not detectwindbgx, the more modern Windows debugger that fully supports Rust.Prefer
windbgxwhen available, fall back towindbgif the former is not available, propagate the debugger exit status, and report a clear error when neither debugger is found.Executed tests:
[x]
windbgxavailable -> launched correctly[x]
windbgxnot available,windbgavailable -> legacywindbgcalled[x] neither available -> error message printed
When a debugger is found and launched successfully, the script returns its exit code (0 normally). When neither debugger is found, PowerShell reports
$LASTEXITCODEas 1.LLM disclosure: I wrote the commit by hand after finding the issue myself. I used an LLM to review the commit before submitting.