Hello,
debugging our script fails as soon as it loads a DLL (LoadLibrary) and calls a function from it.
We see errors and cannot proceed with debugging. Without the DLL, debugging works.
Is this supported in
Product: PowerShell Studio 2025 (64 Bit)
Build: v5.9.262
OS: Windows 11.0.26200
PS Version(s): 5.1.26100.1882?
If so, what debug configuration (native/mixed, symbols)
or workaround should we use? Any known issues or patches?
*** Redirected to 'Former and Future Customers - Questions' section: No active maintenance ***
debugging our script fails as soon as it loads a DLL
Forum rules
DO NOT ANY LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
DO NOT ANY LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
- cepickalad
- Posts: 5
- Last visit: Tue Feb 24, 2026 2:50 am
- Alexander Riedel
- Posts: 859
- Last visit: Wed Jul 01, 2026 9:50 am
- Been upvoted: 49 times
Re: debugging our script fails as soon as it loads a DLL
LoadLibrary implies an unmanaged DLL rather than a managed assembly.
You likely run into calling convention issues, but without more information
it is impossible to tell.
The PowerShell debugger is not capable of debugging from PowerShell into
managed or unmanaged code in a dll. You typically need to use
Microsoft Visual Studio for that.
Without seeing the code or actual error this is just a guess, but
if your call to load the dll or calls to functions throw exceptions,
the script stops and therefore you cannot debug further.
You likely run into calling convention issues, but without more information
it is impossible to tell.
The PowerShell debugger is not capable of debugging from PowerShell into
managed or unmanaged code in a dll. You typically need to use
Microsoft Visual Studio for that.
Without seeing the code or actual error this is just a guess, but
if your call to load the dll or calls to functions throw exceptions,
the script stops and therefore you cannot debug further.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.