Linux how to debug in release environment for clion
To debug in a release environment using CLion in Linux, you need to perform the following steps:
- Open your project in CLion.
- Go to "Run" -> "Edit Configurations".
- In the "Configurations" dialog box, select your target application from the left pane.
- In the "Main" tab, ensure that the executable field points to the release version of your application.
- In the "GDB" tab, check the "Use GDB (run gdbserver locally)" option.
- Set the "GDB debugger" field to the path of your GDB debugger. Usually, it is located at
/usr/bin/gdb. - In the "Debugger" field, enter the following command-line arguments:
--argsfollowed by the necessary command-line arguments for your release application. - Click "OK" to save the configuration.
Now, you can start the debugging session by clicking on the "Debug" button or pressing Shift + F9. This will start debugging your release application using GDB.
Note: Debugging in a release environment may have limited functionality compared to a debug environment. Some optimizations applied during the release build may impact the debugging experience
原文地址: https://www.cveoy.top/t/topic/iNwP 著作权归作者所有。请勿转载和采集!