How to jump to error location?

Is there a way to jump to the file and line number of a compilation error? I thought that ctrl-click should do that but it jumps to the top of the file, rather than the specific line number.

In the the sample compiler errors below, I tried ctrl-click on the ‘src\ble\ble_service.cpp:69:27’ link.

Compiling .pio\build\nrf52_dk\src\acquisition\analyzer.o
Compiling .pio\build\nrf52_dk\src\ble\ble_service.o
Compiling .pio\build\nrf52_dk\src\main.o
Compiling .pio\build\nrf52_dk\src\misc\config_eeprom.o
Compiling .pio\build\nrf52_dk\src\misc\controls.o
Compiling .pio\build\nrf52_dk\src\misc\io.o
src\ble\ble_service.cpp:69:27: error: 'ADC_TICKS_PER_AMP' is not a member of 'acq_consts'
     (uint8_t)(acq_consts::ADC_TICKS_PER_AMP >> 8),
                           ^~~~~~~~~~~~~~~~~
src\ble\ble_service.cpp:69:27: note: suggested alternative: 'TIME_TICKS_PER_SEC'
     (uint8_t)(acq_consts::ADC_TICKS_PER_AMP >> 8),
                           ^~~~~~~~~~~~~~~~~
                           TIME_TICKS_PER_SEC
src\ble\ble_service.cpp:70:27: error: 'ADC_TICKS_PER_AMP' is not a member of 'acq_consts'
     (uint8_t)(acq_consts::ADC_TICKS_PER_AMP >> 0),
                           ^~~~~~~~~~~~~~~~~
src\ble\ble_service.cpp:70:27: note: suggested alternative: 'TIME_TICKS_PER_SEC'
     (uint8_t)(acq_consts::ADC_TICKS_PER_AMP >> 0),
                           ^~~~~~~~~~~~~~~~~
                           TIME_TICKS_PER_SEC

My platformio.ini

[env:nrf52_dk]
platform = nordicnrf52
board = nrf52_dk
framework = zephyr
debug_tool = jlink
monitor_speed = 115200
monitor_port = COM7
debug_build_flags = -O0 -g -ggdb
build_flags =
  -I .pio/build/nrf52_dk/zephyr/include/generated
extra_scripts = extra_script.py

Hello. On Mac, if I hold Option (not control), line/column numbers tun into clickable links that jump to the location of the error. I do see you are on a system where backslash is the system delimiter (Windows), but give it a try.

Same on Linux. Press CTRL and an underline appears. Click the underlined text, while still holding CTRL – takes me to the error file/line.

Cheers,
Norm.

1 Like

I am using Windows. Holding down the CTRL shows the underlying but clicking on it, with CTRL still pressed, jumps to the top of the file, not to the specific line.

Should I file a bug for it?

Sounds like it’s a possible bug, yes, but that functionality is most likely part of the Microsoft C++ extension rather than PlatformIO.

Cheers,
Norm.