# CMake Debugger breaking at function

**URL:** https://discourse.cmake.org/t/cmake-debugger-breaking-at-function/15603
**Category:** Usage
**Created:** [April 14, 2026, 3:05pm UTC](https://discourse.cmake.org/t/cmake-debugger-breaking-at-function/15603 "2026-04-14T15:05:14Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Maaz\_Madha](https://discourse.cmake.org/user_avatar/discourse.cmake.org/maaz_madha/32/5927_2.png) [@Maaz\_Madha](https://discourse.cmake.org/u/Maaz_Madha)
#### Post date: [April 14, 2026, 3:05pm UTC](https://discourse.cmake.org/t/cmake-debugger-breaking-at-function/15603/1 "2026-04-14T15:05:14Z")

</div>

Hi all

My CMAKE debugger is breaking at

> function(pico\_init\_pioasm)
> 
> ```
> \# Assemble the version string from components instead of using PICO_SDK_VERSION_STRING, because the version string
> 
> \# potentially has a PRE_RELEASE_ID suffix, which will trip up the find_package call.
> 
> set(pioasm_VERSION_REQUIRED "${PICO_SDK_VERSION_MAJOR}.${PICO_SDK_VERSION_MINOR}.${PICO_SDK_VERSION_REVISION}")
> 
> if (NOT TARGET pioasm AND NOT DEFINED pioasm_FOUND)
> 
> set(pioasm_INSTALL_DIR ${CMAKE_BINARY_DIR}/pioasm-install)
> 
> if (NOT pioasm_DIR AND EXISTS ${pioasm_INSTALL_DIR}/pioasm)
> 
> set(pioasm_DIR ${pioasm_INSTALL_DIR}/pioasm)
> 
> endif()
> 
> \# Find package - will find installed pioasm, either at pioasm_DIR or system
> 
> find_package(pioasm ${pioasm_VERSION_REQUIRED} QUIET CONFIG NO_CMAKE_FIND_ROOT_PATH)
> 
> if (NOT pioasm_FOUND)
> 
> set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PICO_SDK_PATH}/tools)
> 
> \# todo CMAKE_CURRENT_FUNCTION_LIST_DIR ... what version?
> 
> find_package(pioasm MODULE REQUIRED)
> 
> endif()
> 
> endif()
> 
> if (TARGET pioasm)
> 
> set(pioasm_FOUND 1 PARENT_SCOPE)
> 
> else()
> 
> message("No pioasm found")
> 
> endif()
> 
> ```

and its breaking at

```
    find_package(pioasm ${pioasm_VERSION_REQUIRED} QUIET CONFIG NO_CMAKE_FIND_ROOT_PATH)

```

I think this may be because its not finding the pioasm executable or file, but I have no idea how to fix this, since this should all be done on the build automatically, but isn’t. Should I do add\_custom\_command or add\_custom target to put the pioasm executable there or something, I’m not sure how this works

Kind regards
