Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugger autodetection uses clang regex for gcc #4050

Open
veimmone opened this issue Sep 8, 2024 · 1 comment
Open

Debugger autodetection uses clang regex for gcc #4050

veimmone opened this issue Sep 8, 2024 · 1 comment
Labels
enhancement an enhancement to the product that is either not present or an improvement to an existing feature Feature: debug/launch
Milestone

Comments

@veimmone
Copy link

veimmone commented Sep 8, 2024

I don't have any experience in developing VS Code extensions so I don't even try to make a proper patch, but I found out that here:

miDebuggerPath = compilerPath.replace(clangCompilerRegex, 'gdb');

the compilerPath.replace operation is using a clang-specific regex. In my local dist/main.js I replaced this line with:

miDebuggerPath = compilerPath.replace('gcc', 'gdb').replace('g++', 'gdb');

and got further on my bughunt. You might want to think if a similar regex as for clang.

(As a sidenote, it seems that when using a toolchain file with CMake, the CMAKE_<lang>_COMPILER variables don't necessarily end up in CMakeCache.txt so this method of auto-detection based on the cache fails to begin with...)

@veimmone
Copy link
Author

veimmone commented Sep 8, 2024

Possibly related: #3908

@Yingzi1234 Yingzi1234 added enhancement an enhancement to the product that is either not present or an improvement to an existing feature and removed triage labels Sep 12, 2024
@gcampbell-msft gcampbell-msft moved this from Blocked to Pending Prioritization in CMake Tools Oct 2, 2024
@gcampbell-msft gcampbell-msft added this to the Backlog milestone Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement an enhancement to the product that is either not present or an improvement to an existing feature Feature: debug/launch
Projects
Status: Pending Prioritization
Development

No branches or pull requests

3 participants