CLion 2017.1 Help

Configuring Debugger Options

On this page:

Introduction

CLion supports debugging for C/C++ executables using GDB. CLion provides you with the bundled version of GDB, but you can use any compatible GDB version installed on your platform.

Configuring debugger settings

To configure settings required for debugging, perform the following general steps

  1. In the Project Structure, configure the roots, dependencies and libraries to be passed to the interpreter.
  2. In the Toolchains Dialog Box, check up the actual GDB executable: bundled or specific. Change the current setting, if required.
  3. In the Settings/Preferences dialog box, configure the debugger options:
    • Under the Build, Execution and Deployment, click Debugger, and define the debugger options as required.

Adjusting GDB start-up timeout value

As it is known, there exists delay between the program launch and start of its execution. This time is needed to allocate code in memory, load and deploy program's components, libraries, data, etc. For that reason, start of GDB follows the program's launch with some timeout as well. The value of that timeout is predefined in CLion IDE (90000 milliseconds). However, for massive projects this value can be insufficient. You can adjust it to fit exactly your project. To change the timeout value for GDB to start, do the following:

  • Go to the Help | Find Action main menu option and type registry.
  • In the dialog that opens, type cidr.debugger.timeout.load. Click the Value field of the highlighted string and enter here the timeout value in milliseconds.
    /help/img/idea/2017.1/cl_registryDebuggerTimeout.png
  • Click Close button to apply changes.

See Also

Language and Framework-Specific Guidelines:

External Links:

Last modified: 10 April 2017