web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to debug a PAD Cus...
Power Automate
Unanswered

How to debug a PAD Custom Action

(0) ShareShare
ReportReport
Posted on by 19

Is it possible to debug a PAD custom action dll in Visual Studio?

I have the same question (0)
  • Srini007 Profile Picture
    3,490 Super User 2026 Season 1 on at

    Hi @quer13 

     

    You need to have the code of which custom action was built

     

    If you find this reply helpful, please consider giving it a LIKE AND

    If this reply answers your question or solves your issue, please ACCEPT AS SOLUTION

     

    Regards,

    Srini

  • quer13 Profile Picture
    19 on at

    Hi @Srini007 ,

    I created the custom action for my own as described here https://learn.microsoft.com/en-us/power-automate/desktop-flows/create-custom-actions

    Then I uploaded it to my environment https://learn.microsoft.com/en-us/power-automate/desktop-flows/upload-custom-actions.

    I can use the new custom action dll, but can I debug it?

    If yes, how can I do this?

  • AndyMc Profile Picture
    2 on at

    I have used the unit test package that was initially included in the template download for Custom Actions.  Unfortunately, I can no longer find the link for the project templates so I have included a sample of the project file with a some sample test code.

     

    <Project Sdk="Microsoft.NET.Sdk">
    	<PropertyGroup>
    		<AssemblyName>Modules.SampleModule.Tests</AssemblyName>
    		<Version>1.0.0.0000</Version>
    		<AssemblyTitle>Modules.SampleModule.Tests</AssemblyTitle>
    		<TargetFramework>net472</TargetFramework>
    		<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
    	</PropertyGroup>
    
    	<ItemGroup>
    		<Reference Include="System" />
    		<Reference Include="System.Core" />
    		<Reference Include="Microsoft.CSharp" />
    	</ItemGroup>
    
     <ItemGroup>
     <ProjectReference Include="../Modules.SampleModule/Modules.SampleModule.csproj" />
     </ItemGroup>
    
    	<ItemGroup>
    	 <PackageReference Include="Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK" Version="1.4.*" />
     <PackageReference Include="Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK" Version="1.4.*-*" />
    		<PackageReference Include="Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.Tests" Version="1.4.*" />
     <PackageReference Include="Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.Tests" Version="1.4.341-rc" />
     <PackageReference Include="MSTest.TestAdapter" Version="2.2.*" />
     <PackageReference Include="MSTest.TestFramework" Version="2.2.*" />
    	</ItemGroup>
    
    </Project>

     

    using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.Tests;
    using Microsoft.VisualStudio.TestTools.UnitTesting;
    using System;
    
    namespace Modules.SampleModule.Tests
    {
     [TestClass]
     public class Action1Tests
     {
     [TestMethod]
     public void Action_IsValid()
     {
     bool isValid = ActionValidator.IsValid(typeof(Action1), out var errors);
    
     Assert.IsTrue(isValid, $"Action is invalid. Validation Errors: {Environment.NewLine}{string.Join(Environment.NewLine, errors)}");
     }
    
     [TestMethod]
     public void Action_Execute_Success()
     {
     try
     {
     Action1 action = new Action1() { InputArgument1 = "Test Input" };
     action.Execute(null);
     var actionOutput = action.OutputArgument1;
     }
     catch (Exception e)
     {
     Assert.Fail("Expected no exception, but got: " + e.Message);
     }
     }
     }
    }

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 227

#2
David_MA Profile Picture

David_MA 204 Super User 2026 Season 1

#3
Valantis Profile Picture

Valantis 177

Last 30 days Overall leaderboard