📜  编译器和调试器的区别

📅  最后修改于: 2021-09-11 04:07:48             🧑  作者: Mango

1.编译器
编译器,顾名思义,就是将代码转换成机器指令的过程。它只是将源代码从高级编程语言转换为低级机器语言。它基本上是一个复杂的软件,可以执行代码优化和代码生成。它还使结束代码更高效,并针对执行时间和内存空间进行了优化。

2.调试器
调试器,顾名思义,是用于从代码中删除错误的过程。它只是允许测试和调试其他程序。有时,它还提供两种操作模式,即完全模拟和部分模拟。它用于防止软件或系统的错误操作。它还使用指令集模拟器而不是直接在处理器上运行程序来实现对其执行的更高级别的控制。

编译器和调试器的区别:

Compiler 

Debugger

It is a computer program used to translate high-level language into set machine language.  It is a computer program used to test and debug target programs. 
It generally allows computer to run understand program without need of programming software used to create it.   It generally allows you to uncover and diagnose errors in computer software.  
It is very important to convert text that programmer writes into format that CPU understands.   It is very important to provide maximum useful information of data structures and allows easy interpretation. 
It takes less time as compared to debugger.  It takes more time as fixing some errors may introduce others. 
Compiled programs might have some errors or bugs.  Debugged program cannot have any errors.  
It has capability to detect syntax Errors and compile time errors.     It provides more capabilities to detect errors in programs as compared to compiler.  
It generates IL (Intermediate Language) code. It checks IL code line by line.  
It is more difficult task to design and develop a compiler.   It is less difficult to design and develop a debugger as compared to compiler.  
It performs various tasks such as pre-processing, parsing, semantic analysis, lexical analysis, etc.   It performs various tasks such as check and change data contents, detect and remove existing potential errors, etc.