Bug 391897 - lldb debugger "setting set takes more arguments"
Summary: lldb debugger "setting set takes more arguments"
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: CPP Debugger (show other bugs)
Version: 5.2.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL: https://phabricator.kde.org/D11524
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-15 21:40 UTC by joonatoona
Modified: 2018-03-22 05:58 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.2.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description joonatoona 2018-03-15 21:40:56 UTC
Trying to debug a newly created project just prints "error: 'settings set' takes more arguments" to the LLDB console.

Steps to reproduce:
* Create a new project, and click debug

Also occurs on Fedora 27
Comment 1 Peifeng Yu 2018-03-20 18:49:33 UTC
This is only a warning and doesn't cause any problem with actual debugging. Anyway, fix posted to https://phabricator.kde.org/D11524

BTW, newly created project uses empty CMAKE_BUILD_TYPE by default, so the built binary doesn't include debug symbols. That's why the debugger seems not working.

Try reconfigure cmake in project settings by setting CMAKE_BUILD_TYPE to Debug and rebuild, then the debugger will work correctly.
Comment 2 joonatoona 2018-03-20 21:39:33 UTC
(In reply to Aetf from comment #1)
> This is only a warning and doesn't cause any problem with actual debugging.
> Anyway, fix posted to https://phabricator.kde.org/D11524
> 
> BTW, newly created project uses empty CMAKE_BUILD_TYPE by default, so the
> built binary doesn't include debug symbols. That's why the debugger seems
> not working.
> 
> Try reconfigure cmake in project settings by setting CMAKE_BUILD_TYPE to
> Debug and rebuild, then the debugger will work correctly.

Doesn't look like the project is running at all? It needs to be stopped manually, and no output appears in the konsole tab.

`file` shows `test123: ELF 64-bit [...], with debug_info, not stripped`, and debugging manually with `lldb` seems to work just fine? Am I just missing something?
Comment 3 Peifeng Yu 2018-03-21 19:20:31 UTC
Hmm, you are right that the default build does include debug symbols. Not sure why I didn't get it the first time.

Did you enable break on start in launch configurations? You can check the Frame Stack tab to see if the program was paused somewhere in main.

And program outputs should be printed to Debug tab. Konsole tab is not relevant here.
Comment 4 joonatoona 2018-03-21 19:34:47 UTC
(In reply to Aetf from comment #3)
> Did you enable break on start in launch configurations? You can check the
> Frame Stack tab to see if the program was paused somewhere in main.

Ah, yep! That seems to have been the issue! It was highlighting the first line, but the color was nearly identical to the background. (https://my.mixtape.moe/bbchwy.png)

Thank you :)
Comment 5 Kevin Funk 2018-03-22 05:58:59 UTC
FYI:

commit 63819c741f7263d754f17d8dfa60caa198e751a7 (HEAD -> 5.2, origin/5.2)
Author: Peifeng Yu <7437103@gmail.com>
Date:   Tue Mar 20 14:39:22 2018 -0400

    lldb: don't issue command when there's no env variables to set, fix Bug 391897
    
    Summary:
    LLDB becomes stricter about the `settings set target.env-vars`
    command. Now it doens't allow empty arguments. This causes a warning
    when start debugging session in KDevelop.
    
    https://bugs.kde.org/show_bug.cgi?id=391897
    
    Test Plan:
    - Created a new project with an empty environment variable profile
    - Start debugging with lldb
    - No warnings
    
    Reviewers: apol, #kdevelop
    
    Reviewed By: apol, #kdevelop
    
    Subscribers: kdevelop-devel
    
    Differential Revision: https://phabricator.kde.org/D11524
    
    (cherry picked from commit 3fd20921df6a9d69c54bfc1add86f42185652148)