How to debug build.rs
file?
#942
Replies: 3 comments
-
Cargo is not executed under the debugger. Try this. |
Beta Was this translation helpful? Give feedback.
-
There may be some extra steps involved in more modern Rust versions, it seems like the source file isn't being picked up. |
Beta Was this translation helpful? Give feedback.
-
Ah, okay. Figuring this out was non-trivial, took 40 mins or so, because this knowledge is niche.
You need to disable optimisations for the build to get the breakpoint to work. |
Beta Was this translation helpful? Give feedback.
-
I'm trying to debug a
build.rs
script in vscode, I tried with the following config:However the breakpoints did not hit.
Beta Was this translation helpful? Give feedback.
All reactions