Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to debug (set breakpoint) in file which has no extension
QtWS25 Last Chance

How to debug (set breakpoint) in file which has no extension

Scheduled Pinned Locked Moved General and Desktop
18 Posts 4 Posters 4.3k Views
  • 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.
  • V Offline
    V Offline
    Vinoth R
    wrote on 13 Dec 2016, 06:44 last edited by
    #1

    Hi,
    I am working on an open source project named openIG, which has standard files containing class declaration and definition without any file extension... I am not able to debug the class function inside those files by setting breakpoint.....

    I would like to know if there is any way to debug files which does not has .cpp or .h file extension....

    https://ufile.io/083bd
    check the above link and see the red rectangle box indicating the file type

    any help is appreciated.....

    V 1 Reply Last reply 13 Dec 2016, 12:18
    0
    • V Offline
      V Offline
      VRonin
      wrote on 13 Dec 2016, 07:41 last edited by
      #2

      File extension has nothing to do with the breakpoints, what exactly is that you can't do?

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      1 Reply Last reply
      1
      • V Offline
        V Offline
        Vinoth R
        wrote on 13 Dec 2016, 08:55 last edited by Vinoth R
        #3

        When i debug my application , breakpoints which i set inside class definition is not hit , if those class are defined in a file which has no extension...

        See the below link for reference....
        https://ufile.io/0e56f

        My breakpoints not hitting in file which has no extension, happens only with file that has .cpp/.c extension....

        I would like to know if debugging is possible with file which has no extension.....If so, please guide me how to do them.....

        M 1 Reply Last reply 13 Dec 2016, 09:12
        0
        • V Vinoth R
          13 Dec 2016, 08:55

          When i debug my application , breakpoints which i set inside class definition is not hit , if those class are defined in a file which has no extension...

          See the below link for reference....
          https://ufile.io/0e56f

          My breakpoints not hitting in file which has no extension, happens only with file that has .cpp/.c extension....

          I would like to know if debugging is possible with file which has no extension.....If so, please guide me how to do them.....

          M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 13 Dec 2016, 09:12 last edited by mrjj
          #4

          @Vinoth-R
          Hi. you should mention which compiler/debugger
          I suspect it is Visual Studio.

          1 Reply Last reply
          1
          • V Offline
            V Offline
            Vinoth R
            wrote on 13 Dec 2016, 09:42 last edited by
            #5

            I am using MSVC 2013 compiler .......

            M 1 Reply Last reply 13 Dec 2016, 09:45
            0
            • V Vinoth R
              13 Dec 2016, 09:42

              I am using MSVC 2013 compiler .......

              M Offline
              M Offline
              mrjj
              Lifetime Qt Champion
              wrote on 13 Dec 2016, 09:45 last edited by
              #6

              @Vinoth-R
              So the answer to your question is somewhere
              https://msdn.microsoft.com/en-us/library/sc65sadd.aspx

              ps. Its very not common to have no extensions. So if it cant work, i won't be surprised.
              Its very bad idea in my book as it violates old rules and expectations.

              1 Reply Last reply
              0
              • V Vinoth R
                13 Dec 2016, 06:44

                Hi,
                I am working on an open source project named openIG, which has standard files containing class declaration and definition without any file extension... I am not able to debug the class function inside those files by setting breakpoint.....

                I would like to know if there is any way to debug files which does not has .cpp or .h file extension....

                https://ufile.io/083bd
                check the above link and see the red rectangle box indicating the file type

                any help is appreciated.....

                V Offline
                V Offline
                VRonin
                wrote on 13 Dec 2016, 12:18 last edited by
                #7

                @Vinoth-R said in How to debug (set breakpoint) in file which has no extension:

                open source project named openIG

                Could you share the link to the sources? The one I found looks to be in Java

                "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                ~Napoleon Bonaparte

                On a crusade to banish setIndexWidget() from the holy land of Qt

                V 1 Reply Last reply 13 Dec 2016, 12:49
                1
                • B Offline
                  B Offline
                  BjornW
                  wrote on 13 Dec 2016, 12:32 last edited by BjornW
                  #8

                  Place a breakpoint in a file that calls code in the extensionless file. Follow using step functions (f11). See where it goes!

                  EDIT: f11 is for visual studio; I do not know the QtCreator shortcut.

                  V 1 Reply Last reply 13 Dec 2016, 12:55
                  2
                  • V VRonin
                    13 Dec 2016, 12:18

                    @Vinoth-R said in How to debug (set breakpoint) in file which has no extension:

                    open source project named openIG

                    Could you share the link to the sources? The one I found looks to be in Java

                    V Offline
                    V Offline
                    Vinoth R
                    wrote on 13 Dec 2016, 12:49 last edited by
                    #9

                    @VRonin Here is the link for OpenIG project

                    https://github.com/CCSI-CSSI/MuseOpenIG

                    1 Reply Last reply
                    0
                    • B BjornW
                      13 Dec 2016, 12:32

                      Place a breakpoint in a file that calls code in the extensionless file. Follow using step functions (f11). See where it goes!

                      EDIT: f11 is for visual studio; I do not know the QtCreator shortcut.

                      V Offline
                      V Offline
                      Vinoth R
                      wrote on 13 Dec 2016, 12:55 last edited by
                      #10

                      @BjornW I tried F11 too..... It dint break there......

                      1 Reply Last reply
                      0
                      • B Offline
                        B Offline
                        BjornW
                        wrote on 13 Dec 2016, 13:39 last edited by
                        #11

                        Could you break anywhere?

                        Show your code please :-)

                        V 1 Reply Last reply 14 Dec 2016, 04:16
                        1
                        • B BjornW
                          13 Dec 2016, 13:39

                          Could you break anywhere?

                          Show your code please :-)

                          V Offline
                          V Offline
                          Vinoth R
                          wrote on 14 Dec 2016, 04:16 last edited by
                          #12

                          @BjornW ... See the link below,
                          https://ufile.io/083bd
                          https://ufile.io/0e56f

                          I am not able to debug inside AnimationPath File shown in the link.......

                          I am able to debug and set breakpoints only in files with .cpp extension..... This AnimationPath File has no extension...Its file type is mentioned as "File" itself....Check the link below .......
                          https://ufile.io/f57c4

                          B 1 Reply Last reply 14 Dec 2016, 07:56
                          0
                          • V Vinoth R
                            14 Dec 2016, 04:16

                            @BjornW ... See the link below,
                            https://ufile.io/083bd
                            https://ufile.io/0e56f

                            I am not able to debug inside AnimationPath File shown in the link.......

                            I am able to debug and set breakpoints only in files with .cpp extension..... This AnimationPath File has no extension...Its file type is mentioned as "File" itself....Check the link below .......
                            https://ufile.io/f57c4

                            B Offline
                            B Offline
                            BjornW
                            wrote on 14 Dec 2016, 07:56 last edited by
                            #13

                            @Vinoth-R

                            Try putting a breakpoint in the code calling .getMatrix(...). Then use step functions to go in. Will it hit? Are you sure the code is actually being called from outside? Who calls it and how?

                            AnimationPath myAnimationPath(...);
                            myAnimationPath.getMatrix(...);  //Put breakpoint here, step in. Does it work?
                            
                            V 1 Reply Last reply 14 Dec 2016, 09:19
                            1
                            • B BjornW
                              14 Dec 2016, 07:56

                              @Vinoth-R

                              Try putting a breakpoint in the code calling .getMatrix(...). Then use step functions to go in. Will it hit? Are you sure the code is actually being called from outside? Who calls it and how?

                              AnimationPath myAnimationPath(...);
                              myAnimationPath.getMatrix(...);  //Put breakpoint here, step in. Does it work?
                              
                              V Offline
                              V Offline
                              Vinoth R
                              wrote on 14 Dec 2016, 09:19 last edited by
                              #14

                              @BjornW ....getMatrix() is called from main.cpp
                              check the link for reference.....
                              https://ufile.io/97e2c

                              breakpoint hits in path->getMatrix() from main.cpp.... but when i try step Into that function, i am not able to get inside getMatrix(...) function body.........

                              1 Reply Last reply
                              0
                              • B Offline
                                B Offline
                                BjornW
                                wrote on 14 Dec 2016, 09:52 last edited by
                                #15

                                Well that is strange. Make sure to use the proper step function (step into, not step over). Other than that I am at a loss. Sorry :-(

                                V 1 Reply Last reply 14 Dec 2016, 10:23
                                1
                                • B BjornW
                                  14 Dec 2016, 09:52

                                  Well that is strange. Make sure to use the proper step function (step into, not step over). Other than that I am at a loss. Sorry :-(

                                  V Offline
                                  V Offline
                                  Vinoth R
                                  wrote on 14 Dec 2016, 10:23 last edited by
                                  #16

                                  @BjornW Thank you for helping me........

                                  I tried step into only..

                                  Have u ever tried debugging a (c/c++)code in a file which has no extension or with extension other than (.cpp/.c) file format ????

                                  1 Reply Last reply
                                  0
                                  • B Offline
                                    B Offline
                                    BjornW
                                    wrote on 14 Dec 2016, 10:38 last edited by
                                    #17

                                    Is the library built with debug info enabled?

                                    V 1 Reply Last reply 14 Dec 2016, 10:58
                                    0
                                    • B BjornW
                                      14 Dec 2016, 10:38

                                      Is the library built with debug info enabled?

                                      V Offline
                                      V Offline
                                      Vinoth R
                                      wrote on 14 Dec 2016, 10:58 last edited by
                                      #18

                                      @BjornW ... Yes, I built that OSG Library with debug info enabled and i am using debug version of that library in my application....

                                      1 Reply Last reply
                                      0

                                      1/18

                                      13 Dec 2016, 06:44

                                      • Login

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