When I use vscode debug my code, how does the debugger know where to find the source code? Is the source code path recorded into the binary file when compiling? Sometimes, the debugger complains "Unknown Source", what are the rules behind this?
Asked
Active
Viewed 677 times
1
-
Yes, the source path is written in the debug information of the executable – Alan Birtles Dec 06 '22 at 14:06
-
Are there any commands or tools to see these info? Like `strings` `nm` `objdump` or something? – WilliamAllwaysWin Dec 07 '22 at 04:06
-
https://stackoverflow.com/questions/1999654/how-can-i-tell-if-a-library-was-compiled-with-g – Alan Birtles Dec 07 '22 at 05:39