Skip to content

"IntelliSense engine" has affected the navigation bar's analysis of the code segments, only allowing the display of the outermost code segments. #12483

@YingchangLiu

Description

@YingchangLiu

Environment

  • OS and Version: Debian 12
  • VS Code Version: 1.19.1
  • C/C++ Extension Version: 1.20.5
  • If using SSH remote, specify OS of remote machine:

Bug Summary and Steps to Reproduce

Bug Summary:

After installing the C/C++ extension with IntelliSense Engine enabled by default, when you open a segment of code, you may notice that the navigation bar at the top of VSCode can only display the outermost layer of the code. For example:

1	void **alloc2 (int n1, int n2, int size)
2	{
3		int i2;
4		void **p;
5	
6		if ((p=(void**)malloc(n2*sizeof(void*)))==NULL)
7			return NULL;
8		if ((p[0]=(void*)malloc(n2*n1*size))==NULL) {
9			free(p);
10			return NULL;
11		}
12		for (i2=0; i2<n2; i2++)
13			p[i2] = (char*)p[0]+size*n1*i2;
14		return p;
15	}
  1. When I scroll the code line 10 return NULL; to the top, the navigation bar should display the position of the brackets for the line of code at the top. Under normal behavior (with IntelliSense Engine disabled), it is displayed as:
2	{
8		if ((p[0]=(void*)malloc(n2*n1*size))==NULL) {
-------------------------------------------------------------
10			return NULL;
  1. But if I enable the IntelliSense Engine, it shows:
1	void **alloc2 (int n1, int n2, int size)
-------------------------------------------------------------
10			return NULL;

Expected behavior:

This feature works well with short code, but if there is a longer main program, the code navigation will only display int main(int argc, char **argv). It would be great if this feature could be selectable.

Configuration and Logs

No need.

Other Extensions

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

Feature: Document SymbolOutline view and breadcrumbsLanguage ServiceenhancementImprovement to an existing featurefixedCheck the Milestone for the release in which the fix is or will be available.quick fix

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions