Debugger vs Compiler
In general, compiler is a computer program that reads a program written in one language, which is called the source language, and translates it in to another language, which is called the target language. Traditionally, source language was a high level language such as C++ and target language was a low level language such as assembly language. Debugger is a computer program that is used to find bugs/errors in other programs. Debugger allows a programmer to stop execution of a program at a point and examine the characteristics such as variable values at that point.
What is a Debugger?
调试器是一种计算机程序,用于在其他程序中查找错误/错误。调试器允许执行程序并检查程序执行中的每个步骤。它还允许在某个时候停止执行程序并更改一些变量值,然后继续执行。提供了所有这些功能,以帮助程序员确保其程序的行为正确,并帮助识别代码中的错误。大多数辩论者都提供了逐步执行程序(也称为单个步进)的能力,暂停了通过提供断点和跟踪变量值来检查程序的当前状态。一些高级辩论者允许程序员跳过导致崩溃或逻辑错误的位置,并从其他位置继续执行。一些受欢迎的调试器是GNU调试器(GDB),Microsoft Visual Studio Debugger等。
What is a Compiler?
Compiler is a computer program that reads a program written in one language, which is called the source language, and translates it in to another language, which is called the target language. Most often, the source language is a high level language and the target language is a low level language. So, in general compilers can be seen as translators that translate from one language to another. In addition, compilers perform some optimizations to the code. A typical compiler is made up of several main components. The first component is the scanner (also known as the lexical analyzer). Scanner reads the program and converts it to a string of tokens. The second component is the parser. It converts the string of tokens in to a parse tree (or an abstract syntax tree), which captures the syntactic structure of the program. Next component is the semantic routines that interpret the semantics of the syntactic structure. This is followed by code optimizations and final code generation.
一个调试器之间的区别是什么d a Compiler?
Debugger is a computer program that is used to find bugs/errors in other programs, while compiler is a computer program that reads a program written in one language and translates it in to another language. Compilers also have the capability to detect syntax errors and other compile time errors, but debuggers provide more capabilities (such as monitoring the memory) to detect bugs in programs. These two are two different programs, but most of the times, a debugger and a compiler are integrated into a single package.
kavitasays
sir both debugger and compliler are use for detecting errors in computer programs
then how we can chose the correct option when both are given in options