Skip to content

Code regions become Inactive when the defines exist that should activate them #3524

@noppej

Description

@noppej

Type: LanguageService

Describe the bug

  • OS and Version: MacOS Mojave 10.14.4
  • VS Code Version: 1.33.1
  • C/C++ Extension Version: 0.23.0 (Insiders).
  • Other extensions you installed (and if the issue persists after disabling them): Cortex-Debug, FreeMarker, Python. The problem persists even when I disable these.
  • A clear and concise description of what the bug is.
    I use STM32CubeF4 libraries which depend on C defines to enable code sections.
    When I open one of the library files, the code is active, but after a few seconds, it becomes inactive. As you can see from screenshots, the define for I2C1 exists, but the code region is inactive. Am I doing something wrong?

To Reproduce

  1. Go to ' Command Palette, and >Reload Window'
  2. Click on 'any .c file' in the STMCubeF4 library and look for code regions controlled by defines.
  3. I should note that the same problem is not reproduce-able in my own code. I'm not sure if the difference comes in from the larger code in the library files.
  4. Also worth noticing, is that if I configure the same project in Eclipse (using SW4STM workbench), the code regions work as expected.

Screenshots

Inactive Code Problem

Metadata

Metadata

Assignees

No one assigned

    Labels

    Language ServicebugfixedCheck the Milestone for the release in which the fix is or will be available.insidersCurrently only repros with our latest Insiders release.more info neededThe issue report is not actionable in its current state

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions