VSCode Intellisense fails when including NXDK PDCLib

Open
#375 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
c, vscode

Research direction

Start by reading the reported VSCode C/C++ IntelliSense configuration and how nxdk exposes PDCLib headers, especially the pdclib/platform/xbox/include/ path. Reproduce the missing pdclib/_PDCLIB_config.h error with the provided include paths and investigate why adding that path removes other hints. Done when IntelliSense resolves the header and continues providing hints; the issue names no test or source file.

Written by the indexing model from the issue text.

Description

I'm attempting to get VSCode's intellisense to handle NXDK but I seem to be running into an issue.

This is the error code when you do not set the correct location:
cannot open source file "pdclib/_PDCLIB_config.h" (dependency of "stdint.h")

You can get it to work even with the error above (just missing hints for those parts) by setting "C_Cpp.intelliSenseEngineFallback": "Enabled". If you correctly set the include folder for that header intellisense will stop finding hints for everything however it will stop complaining about the error.

Here is my current config:

{
	"C_Cpp.intelliSenseEngineFallback": "Enabled",
	"C_Cpp.default.systemIncludePath": [
		"/home/wsl/Projects/nxdk/lib/", 
		"/home/wsl/Projects/nxdk/lib/winapi/",
		"/home/wsl/Projects/nxdk/lib/pdclib/include/",
		//"/home/wsl/Projects/nxdk/lib/pdclib/platform/xbox/include/" // <- this is the problem
	],
}

I know the big guys around these parts don't very much care for such features but I find it incredibly helpful and I'm sure new users would as well.

Any ideas or guidance?

Dominant language
C
Stars
600
Forks
97
Avg merge
11h 48m
Merged PRs (30d)
2

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from XboxDev/nxdk

All issues in XboxDev/nxdk

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.