# Module weirdness

**URL:** <https://forums.powershell.org/t/module-weirdness/18074>\
**Category:** PowerShell Help\
**Created:** [November 30, 2021, 12:40am UTC](https://forums.powershell.org/t/module-weirdness/18074 "2021-11-30T00:40:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![david-zemdegs](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/david-zemdegs/32/1461_2.png) [@david-zemdegs](https://forums.powershell.org/u/david-zemdegs)\
**Post date:** [November 30, 2021, 12:40am UTC](https://forums.powershell.org/t/module-weirdness/18074/1 "2021-11-30T00:40:57Z")

</div>

We have a custom module (psm1) which has worked for years. Today I was debugging a script and when calling a function in that custom module and pressing F11, it skipped the function call instead of opening the module file and going into the function. I edited the module and saw the function exists. I did an import-module -force and then a get-module and saw the function name listed under ExportedCommands. The weird thing is that if I do a get-module -listavailable, the module is listed but that particular function does not appear in the ExportedCcommands??? I have confirmed that the module does not appear in any other module paths. Why would there be a difference between the functions listed on get-module and get-module -listavailable?  
Thanks  
David

---

<div class="post-metadata">

**Author:** ![david-zemdegs](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/david-zemdegs/32/1461_2.png) [@david-zemdegs](https://forums.powershell.org/u/david-zemdegs)\
**Post date:** [November 30, 2021, 12:45am UTC](https://forums.powershell.org/t/module-weirdness/18074/2 "2021-11-30T00:45:25Z")

</div>

An updated - I did find the function in the ‘-listavailable’ eventually. So the issue is why did the debugger skip the function call (when pressing F11) when the function clearly exists?

---

<div class="post-metadata">

**Author:** ![david-zemdegs](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/david-zemdegs/32/1461_2.png) [@david-zemdegs](https://forums.powershell.org/u/david-zemdegs)\
**Post date:** [November 30, 2021, 10:15pm UTC](https://forums.powershell.org/t/module-weirdness/18074/3 "2021-11-30T22:15:30Z")

</div>

Nothing made sense. I tried to debug it on other computers. I dragged the function out of the module and put it in the script itself. I changed the name of the function. Whatever I did, F11 just refused to run that function. Other module functions in the same script worked fine - F11 would open the module and debugging continued. The only solution was to grab the code from the function itself and stick it in the script. Its just too weird.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/powershell/original/1X/385e4f9fe133561ad30a814262fe0e0ae6bc3ef0.png) [@system](https://forums.powershell.org/u/system)\
**Post date:** [February 10, 2024, 5:34pm UTC](https://forums.powershell.org/t/module-weirdness/18074/4 "2024-02-10T17:34:07Z")

</div>

Closed on February 10, 2024, 5:34pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
