Skip to content

I cannot stress enough how much I do not want this to happen #12843

Open

Description

@mythemeria

Image
This is awful. I was previously able to press F2 and rename a symbol. Today I try to do that and you have done something with your extension that makes it take 20x as long. What's more, I can't find the setting to disable this AWFUL behaviour anywhere. I mostly use this feature to deobsfucate code for. You've completely broken my workflow. Thanks.

Activity

  1. bobbrow commented on Oct 16, 2024

    @bobbrow
    Contributor

    Hi there, mythemeria. We didn't notice any major performance issues in our testing, so it sounds like there is a test case we need to add to avoid this happening again. Do you have an example you can share with us? We'd be happy to investigate if you can give us a little more information to work with.

    And which behavior are you asking to disable? The refactor preview? The refactor preview is a VS Code feature and has existed for a long time and only appears when we don't have 100% confidence in all the rename candidates. The 20x slow down you're reporting hopefully shouldn't have anything to do with that.

  2. Colengms commented on Oct 16, 2024

    @Colengms
    Contributor

    Hi mythemeria . Given the 116 detected problems, and that some of the identifiers found by Rename were not checked by default (not confirmed to be semantically related), it's possible the issue you are seeing is related to configuring IntelliSense, not with the Rename operation itself. Can you share more about how you've configured IntelliSense for your workspace? Ideally, IntelliSense should be configured with exactly the same compiler arguments used to compile files.

  3. mythemeria commented on Oct 17, 2024

    @mythemeria
    Author

    Hi, in the above screenshot, I am not writing code, I am using VS code to make it easier to understand decompiled output from IDA. This involves a lot of renaming variables but the code typically does not actually run. The slow down I mention is the fact I need to go through extra steps with this refactor window to rename variables and make it not mess with other files when I am just using a throwaway workspace for parsing decompiler output. I still have not figured out how to make this go away, and ended up just renaming the file to .py so it would work.

    Sorry, my initial post was hastily written as I was extremely frustrated trying to fix this last night.

  4. Colengms commented on Oct 17, 2024

    @Colengms
    Contributor

    Hi mythemeria . Have you tried setting editor.rename.enablePreview to false?

    The C/C++ extension provides symbol locations (both semantic and syntactic/lexical) to VS Code, which it uses to populate the rename preview UI. Semantic matches are considered a proper match while other matches to likely not be the same variable/class/etc. you're trying to rename.

    The C/C++ extension uses a compiler front-end internally to provide language service features (IntelliSense) based on a semantic interpretation of the code. Those features assume configuration has been provided that matches how the source code would be successfully built. It's possible you might be able to configure IntelliSense sufficiently for it to better interpret your decompiled code and provide better semantic matches.

    You might consider opening an issue in the VS Code repo asking for improvements to the rename/refactor preview UI.

  5. ericchase commented on Feb 10, 2025

    @ericchase

    Have you tried setting editor.rename.enablePreview to false?

    Image

    Image

    Thought I'd answer the question. This setting does not affect the Preview panel as of latest VSCode and C/C++ Extension.

  6. ericchase commented on Feb 10, 2025

    @ericchase

    As I am familiar with instant doubts, here is my preemptive Windows Sandbox demonstration with a fresh installation of VSCode:

    Image

    I'm sure there are reasons™ as to why the Refactor Preview panel opens even for such a simple case like this. Regardless, I too would like a working setting that tells the C/C++ extension to just do the renaming without asking me for confirmation.

  7. ericchase commented on Feb 10, 2025

    @ericchase

    Sorry, forgot to show the setting in screenshot.

    Image

  8. mehlian commented on Jul 21, 2026

    @mehlian

    Why there is no option to disable this 'refactor preview' panel when renaming? Screenshot above shows that correct symbols are selected to rename. I do not want to rename words in comments just because there is match with symbol. There may be some cases that this could break some macros but I'll catch that when compiling or when committing to version control system.
    Apply button is not even in focus so I have to use mouse to confirm rename.
    Please add option to disable this preview panel and apply changes on found symbols without additional confirmation.

    Edit: problem here is with user experience and workflow, not performance of implementation of this feature as labels suggest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status
      No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions