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. GDB under QtCreator on WSL/Ubuntu 18.04 does not start properly
Forum Updated to NodeBB v4.3 + New Features

GDB under QtCreator on WSL/Ubuntu 18.04 does not start properly

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
4 Posts 4 Posters 991 Views 2 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.
  • M Offline
    M Offline
    mlperini
    wrote on 18 Mar 2020, 12:17 last edited by
    #1

    This happens when using QtCreator to debug a WSL program on Ubuntu 18.04: Start debugging, the program seems to start, GDB is launched, but either GDB doesn't seem to fully attach to the program, or QtCreator can't communicate with it. The QtCreator console is unable to interrupt the process. Quitting QtCreator leaves the debugger and the program hung.

    A simple console C++ application without Qt created by QtCreator's wizard for creating a new project demonstrates the issue.

    I've verified the same behavior on a number of different Windows 10 computers hosting WSL/Ubuntu 18.04. Windows is version 1909, WSL 1.

    The program can be debugged in a standalone GDB, or under Emacs GDB mode with no issues.

    Matt

    J 1 Reply Last reply 18 Mar 2020, 12:26
    0
    • M mlperini
      18 Mar 2020, 12:17

      This happens when using QtCreator to debug a WSL program on Ubuntu 18.04: Start debugging, the program seems to start, GDB is launched, but either GDB doesn't seem to fully attach to the program, or QtCreator can't communicate with it. The QtCreator console is unable to interrupt the process. Quitting QtCreator leaves the debugger and the program hung.

      A simple console C++ application without Qt created by QtCreator's wizard for creating a new project demonstrates the issue.

      I've verified the same behavior on a number of different Windows 10 computers hosting WSL/Ubuntu 18.04. Windows is version 1909, WSL 1.

      The program can be debugged in a standalone GDB, or under Emacs GDB mode with no issues.

      Matt

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 18 Mar 2020, 12:26 last edited by
      #2

      @mlperini I would bring this to the developers mailing list or Qt Bug Tracker as I don't think many people use WSL already with Qt/QtCreator.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • J Offline
        J Offline
        jcm69
        wrote on 21 Apr 2020, 18:23 last edited by jcm69
        #3

        Hi,
        same here. I don't quit qtcreator, I hit Debug -> abort one or two times and after a few second a window appears saying that gdb is not responding and you have the possibility to click on a "stop debugging" button that works.
        I can see a message is the xterm where I launched qtcreator saying :

        "The command \"/mnt/c/Users/.../src\" could not be started."
        

        which is true since this is a directory. ;) May this wrong path is given to gdb instead of the path to the executable ?
        HTH,
        jc

        1 Reply Last reply
        0
        • M Offline
          M Offline
          MRota
          wrote on 6 May 2020, 22:43 last edited by
          #4

          @mlperini @jcm69 can you provide some steps to reproduce the issue with a minimal example?

          Moreover:

          • how did you configure the kit for build/deployment?
          • are you running QtCreator on Windows or inside WSL through an Xserver?
          1 Reply Last reply
          1

          • Login

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