Visual GDB warning

Sysprogs forums Forums VisualGDB Visual GDB warning

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #24654
    IkennaOkafor
    Participant

    For my project I have manually edited the program arguments for my executable using the Visual GDB properties, but everytime I run my program a dialog box appears which states:

    “The project debug settings are not configured to inherit the per-target working directory/program arguments specified via VS Properties. Do you want to fix the debug settings?”

    If I click no, everything proceeds fine, however if I click yes it deletes the program arguments I specified. Is there a way to prevent this dialog box from appearing all the time?

    #24655
    support
    Keymaster

    Sorry, this is actually by design. The settings in VisualGDB Project Properties are shared between all CMake targets, while the command-line arguments normally make sense only for a specific targets.

    Hence VisualGDB would normally expect you to specify the arguments via the VS Project Properties for each target (i.e. item with the console icon in the Solution Explorer) separately and will automatically substitute them to the $(SelectedCMakeTargetArgs) variable based on the currently selected startup target. This eliminates the need to change the arguments when debugging another target in a multi-target project.

    #24659
    IkennaOkafor
    Participant

    I understand.

    Is there a CMake variable which I can set that corresponds to $(SelectedCMakeTargetArgs)

    #24660
    support
    Keymaster

    The VisualGDB variables work on top of CMake, hence they are not mapped back to it. Otherwise, the project would need to be rebuilt each time you select a different target to debug.

    If you could let us know what you are trying  to accomplish, we could try to suggest a workaround.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.