Skip to content

Debugger autodetection uses clang regex for gcc #4050

Open
@veimmone

Description

@veimmone

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...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature: debug/launchenhancementan enhancement to the product that is either not present or an improvement to an existing feature

    Type

    No type

    Projects

    Status

    Pending Prioritization

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions