New Arduino project on esp32 – incorrect mapping only on cpp files

Sysprogs forums Forums VisualGDB New Arduino project on esp32 – incorrect mapping only on cpp files

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #34841


    If I create a new Arduino project for the esp32 with VisualGDB, I can place a break point in the main .ino file without issue.

    If I add  test.cpp and test.h to the project, when I try to place a break point in test.cpp, I get a warning “Incorrect path mappings might be preventing breakpoints in this file from working correctly”.

    Attachments are…

    step1.png – adding the breakpoint
    step2.png – after clicking diagnose this dialog shows
    step3.png – After clicking Next >.  At this point the breakpoint is working.
    Path mapping.png – The path mapping section of properties.


    This has only started recently.   The same happens on my Dads computer even after updating all the components to the latest version.

    My current installation has (visualgdb 5.6R4 (build 4777)   esp32 toolchain 12.2.0/12.1/r1,    openocd 20210625-0.11.0,   esp debug methods 20210629 )

    Any clues as to why I am getting these mapping errors.


    Any help appreciated



    Below the GDB output when adding the breakpoint.


    esp32.cpu0: Target halted, PC=0x4014D2C2, debug_reason=00000000
    Set GDB target to 'esp32.cpu0'
    esp32.cpu1: Target halted, PC=0x4014D2C2, debug_reason=00000000
    [New Thread 1073466864]
    [New Thread 1073447304]
    [New Thread 1073450460]
    [New Thread 1073436764]
    [New Thread 1073446240]
    [New Thread 1073452160]
    [New Thread 1073452520]
    [New Thread 1073445360]
    [New Thread 1073443660]
    1 received signal SIGINT, Interrupt.
    [Switching to Thread 1073465464]
    0x4014d2c2 in esp_pm_impl_waiti () at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/hal/esp32/include/hal/cpu_ll.h:183
    183 in /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/hal/esp32/include/hal/cpu_ll.h
    -break-insert -f J:/ArduinoProject1/Output/ESP32_Wrover_Module/Debug/sketch/test.cpp:7
    Reading in symbols for J:\ArduinoProject1\Output\ESP32_Wrover_Module\Debug\sketch\test.cpp...
    &"No source file named J:/ArduinoProject1/Output/ESP32_Wrover_Module/Debug/sketch/test.cpp.\n"
    ^done,files=[{file="J:\\ArduinoProject1\\sketches/test.cpp",fullname="J:\\ArduinoProject1\\sketches\\test.cpp"}, ....... a lot more more folders..."}]




    You must be logged in to view attached files.


    It looks like your technical support period has expired. We would be happy to help you, however we would kindly ask you to renew your technical support on the following page first:



    I resubbed.

    I have ugraded to VisualGDB 6 and the latest esp-idf and tools etc.

    I still get same problem.

    Could you please let me know how to fix it.




    Thanks for renewing your license. The J:\ArduinoProject1\Output\ESP32_Wrover_Module\Debug\sketch\test.cpp path is likely derived by VisualGDB from the default base directory (J:\ArduinoProject1\Output\ESP32_Wrover_Module\Debug\sketch) and the relative part (test.cpp).

    You can try setting the Default Windows Directories -> Relative Paths option on the Path Mapping page to J:\ArduinoProject1\sketches and see if it fixes the path computed by VisualGDB.

    Another workaround would be to enable VisualGDB Project Properties -> Advanced GDB Settings -> Common Workarounds -> Use file names only when setting breakpoints. This will shorten the paths used in -break-insert to just file name (e.g. -break-insert -f test.cpp:7), working around most path mapping glitches.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.