Code Folding ?

Sysprogs forums Forums VisualGDB Code Folding ?

Viewing 7 posts - 16 through 22 (of 22 total)
  • Author
    Posts
  • #24510
    support
    Keymaster

    Sorry, there are no links to the solutions because nobody else has reported anything similar in the past 7 years.

    If you would like our help to solve this, please follow exactly the steps below:

    1. Check if this can be reproduced on a freshly created “LEDBlink” project.
    2. Check if the problem can be reproduced on a non-VisualGDB C++ project.

    If the problem is not specific to VisualGDB projects, it might be caused by something else (you can double-check it by uninstalling VisualGDB). If the problem is specific to VisualGDB projects, please create a video showing the repro, from starting Visual Studio to the problem actually occurring.

    #24519
    jona
    Spectator

    I took the source files that were failing, copied the text to an empty notepad  and imported the text back into a new empty .c file, a piece at a time. Now, I have the outlining back. I wonder what could have been in those files that prevented outlining.

    #24592
    jona
    Spectator

    Ok.. so.. The problem has returned on one file. Something is in this file that messes with the outlining and code folding. If I copy the contents into notepad and delete everything in the C file, Then.. copy the  text from notepad back into the file, usually from the bottom up, in 2 parts, I can get code folding to work again, but only until I add more code. Usually breaks when I add a  function or a region. Sometimes it breaks when I am modifying existing code.  I have tried to narrow it down to a specific line of text but I am unable to.

    Is there something in the formatter that could cause this?

    I also found that if you put comments on the line where a function is being defined, it will break outlining:

    static void func() //comment..

    I don’t have any idea how this could happen but I am wondering if anyone knows what could cause this?  Any help , or hints, greatly appreciated.

    #24593
    support
    Keymaster

    If the problem can be reproduced on a specific file, please send it to our support email (or post it here) along with a screenshot demonstrating the problem and the exact steps we could follow on our side to reproduce it. Once we can reproduce the problem, we should be able to fix it or suggest a workaround.

    #24598
    jona
    Spectator

    I opened a ticket and sent two files. Didn’t get a confirmation yet but .. I will check here as well in case you did not get them. Thanks again!

    #24599
    support
    Keymaster

    We have received the files and were able to reproduce and solve the problem. Turns out, a single-line comment (//comment)  at the end of a line declaring a function implementation inside a #pragma region block with CRLF line endings indeed prevented the subsequent #pragma region blocks and their contents from being recognized within the same parse operation.

    Please note that the chance of guessing such a specific combination of factors from a generic description that the code folding stopped working is effectively zero and that is exactly the reason why we always ask for specific repro steps. Having a repro file and a description where to look, it took us less than 5 minutes to pinpoint the root cause. Without it, no reasonable amount of trying different combinations would trigger this issue on our side.

    Please try this build, it fully resolves the problem: VisualGDB-5.4.104.3071.msi

    #24601
    jona
    Spectator

    Excellent! I knew if we both stuck it out there would be a solution somewhere! I will try this now and post results.

     

    So.. first in 7 years? 🙂

Viewing 7 posts - 16 through 22 (of 22 total)
  • You must be logged in to reply to this topic.