Create a .vscode/launch.json file and paste the below JSON contents into it:
This uses cargo directly to build the Rust application and load it in both development and production modes.
Note that it does not use the Tauri CLI, so exclusive CLI features are not executed. The beforeDevCommand and beforeBuildCommand scripts must be executed beforehand or configured as a task in the preLaunchTask field. Below is an example .vscode/tasks.json file that has two tasks, one for a beforeDevCommand that spawns a development server and one for beforeBuildCommand:
Now you can set breakpoints in src-tauri/src/main.rs or any other Rust file and start debugging by pressing F5.