numaru / vscode-ceedling-test-adapter

Ceedling Test Adapter for the VS Code Test Explorer
MIT License
37 stars 14 forks source link

Unable to debug test when specific preprocessor definitions are set #42

Closed CezaryGapinski closed 4 years ago

CezaryGapinski commented 4 years ago

When special preprocessor definitions for test are specified in ceedling project.yml then is not possible to debug this specific test. Ceedling create executable file not in build/test/out but in additional subdirectory named like the executable without extension.

For example when we have temp_sensor project you can add this to :defines: section:

:defines:
  :TestAdcHardware:
    - *common_defines
    - TEST
    - SPECIAL_DEF

After creating test the path to output looks like this: build/test/out/TestAdcHardware/TestAdcHardware.out instead of build/test/out/Test/TestAdcHardware.out what cause problem with launching the file to debug.

Is it possible to modify ceedlingExplorer.debugTestExecutable after first failure when output is not found for debug in standard path, add subdirectory to the current path and try to start debug again?