简体   繁体   中英

What is the difference between debug and compile?

What is the difference between debug and compile?

How do I compile an application without debugging in Visual Studio?

Compile is the act of turning human-readable code into code the machine can understand and execute.

Debug is the act of finding out where in the code the application is going wrong (debug = get rid of bugs.)

In the context of an IDE, compile (Build in Visual Studio) just builds the code, debug (Run in Visual Studio) compiles the code, launches it and attaches a debugger.

“编译”仅构建应用程序,但“调试”编译它并启动它以进行调试。

Debugging is the process of removing bugs from the code, typically by stepping through code to identify the bug. A tool that helps one step through code is called a debugger. A debug build is one that has symbols to allow the developer to step through lines of source code while executing.

Compiling is the process of turning code into machine instructions (or some kind of intermediate language, or bytecode, etc). A tool that does this is called a compiler.

编译代码会生成IL代码,调试在运行时进入代码,从IL代码转换为机器语言。

Go to the menu item "Build -> Build Solution" or press F6. This will build(Compile) the solution without entering debug mode.

Hope this helps

Debugging is a part of compilation which can't happen without compilation ie, converting the whole thing into machine language. So if the compiler finds a problem in compiling then the debugger helps in removing it to complete the compilation.

编译器将代码转换为高级代码并检查漏洞代码,在调试器中逐行检查它们的代码

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM