Get the App
SLTechnology News&Howtos  ›  Development  › 

What is the method of program debugging and memory detection in CAccord +?

Shulou Source: shulou.com Published: 2022-06-02 09:21:43 10月29日 Update

This article mainly talks about "what is the method of program debugging and memory detection". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn "what is the method of program debugging and memory detection"?

1. Common debugging skills

(1) check the code, reread the program and rule out obvious errors. Compile with the-Wall parameter to generate all warnings.

Gcc-Wall-pedantic-ansi means to generate all warning messages in ansi/iso.

(2) sampling: add some code to the program to collect more information related to the behavior of the program when it is running. Using conditional compilation, you can clearly identify what is debug code, which is conducive to the finishing of the code after debugging.

For example:

# ifdef DEBUG

Std::cout

Tags: Programs memory code compilation information runs commands methods locations variables detections parameters more flags errors checks clarity content functions actual Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Redmi Apple vpn Microsoft