No source file name <src\main.rs> (from break-insert)
See original GitHub issueTrying to get the debugger working with a Rust project and seem to run into this.
ERR No source file named e:\Projects\RustyPill\src\main.rs. (from break-insert "e:\\Projects\\RustyPill\\src\\main.rs:40"):
Error: No source file named e:\Projects\RustyPill\src\main.rs. (from break-insert "e:\\Projects\\RustyPill\\src\\main.rs:40")
My launch.json
{
"version": "0.2.0",
"configurations": [
{
/* Configuration for the STM32F103C8T6 *Black Pill* board */
"type": "cortex-debug",
"request": "launch",
"name": "Debug (OpenOCD)",
"servertype": "openocd",
"cwd": "${workspaceRoot}",
"preLaunchTask": "Cargo Build",
"runToMain": true,
"executable": "./target/thumbv7m-none-eabi/release/rusty_pill",
"device": "STM32F103C8",
"configFiles": [
"interface/stlink.cfg",
"target/stm32f1x.cfg"
],
"postLaunchCommands": [
"monitor arm semihosting enable",
],
"svdFile": "${workspaceRoot}/.vscode/STM32F103.svd",
"showDevDebugOutput": true,
}
]
}
FWIW, main.rs
does exist π
.
βββ Cargo.lock
βββ Cargo.toml
βββ memory.x
βββ openocd.cfg
βββ openocd.gpb
βββ src
β βββ main.rs
βββ target
βββ CACHEDIR.TAG
βββ debug
βββ release
βββ thumbv7m-none-eabi
Iβm on Windows if that makes a difference.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6
Top Results From Across the Web
No source file named main.c. gdb break point setting
No source file named main.c. Even when I pass specific function name (in main.c file) to break . it says: such function not...
Read more >Cannot set GDB / Debugger breakpoints (#877) Β· Issues - GitLab
src/main.rs exists, but doesn't get recognized by GDB. 20:17:50.0718 gbp-gdb-debugger[ 4646]: DEBUG: gdb-error: No source file named ...
Read more >error "failed to fetch file at path \"main\"" Β· Issue #52 Β· cs01/gdbgui
I have the target executable in /target/debug/myexecutable . And the source in /src/main.rs . GDB can find the file, it I type break...
Read more >C / C++ IDE (CDT) Β» No source file named main.cpp - Eclipse
Dear All, Recently I experienced very common problem with "No source file named /home/.../main.cpp." With "Stop on startup at: main",Β ...
Read more >breakpoint - "No source file named" - NXP Community
Hi There, I have recently moved a project from an old hard drive to a new one. I have been able to import...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Closing for now, you can continue to report progress/issues
Happy to report that it was user error as usual - built it with debug symbols, and things are working as expected.