Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    [Solved] VisualStudio 2013 with Qt5.5 addin debugging woes

    General and Desktop
    debugging visual studio 2 qt addin
    2
    5
    1283
    Loading More Posts
    • 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.
    • P
      panch last edited by panch

      Hi,

      I installed the Qt5.5 environment along with the addin for MSVC 2013. In general it works really great, but one thing is driving me mad; debugging!
      Most of the time, variables in the debugging view are invalid, and also the program pointer jumps around when debugging. The only way I can get reasonable data out, is by using qDebug() - automatic or local variables make no sense, which is a major annoyance.

      I have not tried to make a very simple qt application, to verify if it is a general problem or if it has anything to do with the settings of my current project.

      Any tips anyone?

      1 Reply Last reply Reply Quote 0
      • Chris Kawa
        Chris Kawa Moderators last edited by Chris Kawa

        the program pointer jumps around when debugging

        It doesn't sound like a Qt problem. This happens when you're debugging an optimized build.
        Are you debugging a Release or Debug build? If it's Debug then check the project setting under Configuration Properties -> C/C++ -> Optimization and see if Optimization option is set to anything other than Disabled (which is what it should be for debug build).

        1 Reply Last reply Reply Quote 0
        • P
          panch last edited by

          Thanks, I think that solved my problem. The wrong optimization setting must have come while setting up the project. Disabling the optimization makes the debugging work again. Thanks!

          As as side question, you may be able to tell me why edit-and-continue doesn't work for my project? When I edit a line, it just says the executable does not anymore match the code.

          1 Reply Last reply Reply Quote 0
          • Chris Kawa
            Chris Kawa Moderators last edited by

            Make sure the right options are set as described here and that you're not in one of the unsupported scenarios. Also note that edit and continue is not supported in VS2013 for native projects when compiling for x64 (that support is back in VS2015).

            1 Reply Last reply Reply Quote 0
            • P
              panch last edited by

              Ahh ok. Thanks alot. That clears it up for me!

              1 Reply Last reply Reply Quote 0
              • First post
                Last post