When File name is changed, debugging no longer works

Sysprogs forums Forums VisualGDB When File name is changed, debugging no longer works

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #27896
    vshashi01
    Participant

    Hi,

    I changed an existing file name from the Solution Explorer for a source and header file. After changing the names while the program compiles and runs as expected, setting a breakpoint in the file with the changed name will no longer work.

    I decided to get the debug log and this are the specific lines related to the breakpoint in the specific file.

     

    [ 6273 ms] ^done
    [ 6273 ms] -break-insert -f C:/Users/thara/source/repos/stmBot/stmAPP/stmAPP/pushButton/push_button.cpp:79
    [ 6284 ms] &”No source file named C:/Users/thara/source/repos/stmBot/stmAPP/stmAPP/pushButton/push_button.cpp.\n”
    [ 6284 ms] ^done,bkpt={number=”3″,type=”breakpoint”,disp=”keep”,enabled=”y”,addr=”<PENDING>”,pending=”C:/Users/thara/source/repos/stmBot/stmAPP/stmAPP/pushButton/push_button.cpp:79″,times=”0″,original-location=”C:/Users/thara/source/repos/stmBot/stmAPP/stmAPP/pushButton/push_button.cpp:79″}
    [ 6285 ms] -break-after 3 0
    [ 6295 ms] ^done

    How do I fix this issue?

    Thank you.

    #27917
    support
    Keymaster

    Hi,

    This is to be expected. If you just rename the file, the debugging symbols will store the old file path, preventing the breakpoints from working. Please try building/rebuilding the project after you rename the file.

    #27919
    vshashi01
    Participant

    Hi, i am sorry if it was not clear earlier, i did rebuild my project with all the includes succeeded to create a build. However, when I use the debugger, i can never step into any code that is inside the recently name changed file. And yes I have tried a clean building as well, still it doesnt work.

    These files are source files that is in a static library project which i compile with another embedded library project.

    The only way i have gotten to make it work is by recreating a new project and reimporting all the files again..

    #27920
    support
    Keymaster

    Thanks for clarifying this. Normally, just rebuilding the project should have helped. Most likely some dependencies between different components were not handled correctly, so the executable still ended up with the old debugging symbols.

    Please consider reading our symbol troubleshooting tutorial. It explains how the debug symbols work and how to check their status.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.