How to debug Ubuntu Scope in Qt Creator

Source: Internet
Author: User

Currently, most of our debugging scopes use Qdebug to output information for viewing, or CERR standard C + + output. In this article, we will show you using GDB to debug our scope.

1) First create a basic scope
We use our SDK to create one of the most basic scopes:

This allows us to create a basic scope.

2) Install Gdbsever for our mobile phone
For some reason, our phone is not gdbserver. In order to debug, we need to install this software to be able to debug online. We start a terminal and type the following command:

So we'll install the gdbserver.

3) Commissioning of our scope
We can open our scope project and use the mouse to click the appropriate area to set breakpoints:

Set the " -dcmake_build_type=debug" Flag bit in our compilation:

We can press the " F5" key so that we can see our scope run to the breakpoint we set. We can check the values of the variables we want to know, or we can see the order in which the programs run.

We can see the values of each variable in the window above, and use the " F10" key to track the operation of the scope step after stage.
For some reason, the mobile phone may be restarted when the scope is uninstalled after the scope is debugged. We already know the problem at the moment. The corresponding bug can be seen in the address.

How to debug Ubuntu Scope in Qt Creator

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.