Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Apart from the symbols, the debugger needs to have access to the source code belonging to the components being debugged. This is needed to step through the various source lines as they were in your code editor. Likewise, it wouldn’t make sense to install source code on the target device, since it is not needed for normal operation and would consume a lot of disk space.

Image Added

When a program is compiled, the resulting executable code contains machine code that is difficult to understand and interpret by humans. However, if the debugger has access to the original source code, it can use that information to provide developers with useful information such as the current line of code being executed, the values of variables, and the call stack.

Without access to the source code, the debugger would have limited information about the program and would be less useful in identifying and fixing bugs. Therefore, it's important to ensure that the debugger has access to the appropriate source code files when debugging a program.