Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Can't attach debugger in QtCreator on Ubuntu

Can't attach debugger in QtCreator on Ubuntu

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
3 Posts 2 Posters 758 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Please_Help_me_DP Offline
    Please_Help_me_DP Offline
    Please_Help_me_D
    wrote on last edited by
    #1

    Hi,

    I'm trying to attach debugger to running application.
    If I do that from QtCreator I get the error:

    The GDB process terminated unexpectedly (exit code 1).
    

    and right after closing that window I also get another error:

    GDB IO error
    An error occured when attempting to write to the process. For example, the process may not be running, or it may have closed its input channel.
    Error writing to process
    

    But if I attach GDB directly from terminal then there is no any problem (as I think as its my first time I run GDB from terminal)

    By the way I follow instructions from here

    If I simply try to click on "RUN AND DEBUG" button then I also get the first error (even though the PATH var is complicated but it should be correct)

    The application is built by me in Debug config using CMake.
    Ubuntu 20.04

    My kit:

    f90c19ea-c47d-4ad6-9479-4aa76aa855d6-image.png

    1 Reply Last reply
    0
    • mumanM Offline
      mumanM Offline
      muman
      wrote on last edited by
      #2

      Hello,

      Your kit looks good. But a little more information may be required to determine the root cause of this issue.

      I assume you are building the Debug version of the application. In QtCreator this is accomplished through the left-side toolbar. You should be able to make Debug, MinRelease, Release, RelDebug versions.

      It appears you are using Qt 5.15.2 from the kit configuration.

      It is good you made the change to the ptrace_scope file as that step is required to debug on Ubuntu distros.

      Good Day,
      Michael Uman

      Please_Help_me_DP 1 Reply Last reply
      1
      • mumanM muman

        Hello,

        Your kit looks good. But a little more information may be required to determine the root cause of this issue.

        I assume you are building the Debug version of the application. In QtCreator this is accomplished through the left-side toolbar. You should be able to make Debug, MinRelease, Release, RelDebug versions.

        It appears you are using Qt 5.15.2 from the kit configuration.

        It is good you made the change to the ptrace_scope file as that step is required to debug on Ubuntu distros.

        Good Day,
        Michael Uman

        Please_Help_me_DP Offline
        Please_Help_me_DP Offline
        Please_Help_me_D
        wrote on last edited by
        #3

        @muman thank you for reply,

        Yes I'm building Debug version of an app.

        I don't know how but after I successively launched debugger in VS Code I'm now able to debug my application within QtCreator.

        Maybe restarting the PC also had some importance...

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved