Closed jmd1011 closed 4 months ago
I was able to make things work by adding "program": "${workspaceRoot}/target/debug/deps/projectName-SHA"
where the SHA is found from the output of cargo test --no-run
. It's not ideal but it works!
For future reference or in case you or anyone else wants to work on this.
https://github.com/daveleroy/SublimeDebugger/blob/cb9971093bdb255d943c6d0ae5caff3641130f2f/modules/adapters/lldb.py#L86 is where one could add support for performing cargo operations based on the cargo configuration parameter and populating the program
field with the results.
This would also need to use the existing async process functions or require adding some additional ones https://github.com/daveleroy/SublimeDebugger/blob/cb9971093bdb255d943c6d0ae5caff3641130f2f/modules/dap/transports.py#L43
I am trying to debug unit tests in Rust in Sublime using SublimeDebugger.
When I run Add Configuration for CodeLLDB: Debug Cargo Tests, it generates the following configuration:
However, this will not run due to missing the
program
attribute. Adding"program": "${workspaceRoot}/target/debug/projectName"
enables me to start the debugger...but when I start debugging, the debugger drops into the main function in the file rather than the unit tests. This link says to usecargo
instead ofprogram
in VSCode. However, thecargo
field seems to be entirely ignored by SublimeDebugger.