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.

Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to debug a
build.rsscript in vscode, I tried with the following config:{ "version": "0.2.0", "configurations": [ { "type": "lldb", "request": "launch", "name": "build", "cargo": { "args": [ "build", "-vv" ], "filter": { "name": "physx-sys", "kind": "lib" } }, } ] }However the breakpoints did not hit.
Beta Was this translation helpful? Give feedback.
All reactions