Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Answered

How to debug CRT

(0) ShareShare
ReportReport
Posted on by 1,439

I am following the steps in this link: community.dynamics.com/.../debugging-commerce-runtime-in-the-new-dynamics-ax-ax7

However it uses MPOS and I am using CloudPOS.

I made sure that for step 2 I have the breakpoints in my project where I want to debug.

For step 3, I assume I have to run cloudPOS using VS. So opening RetailSDK\POS\CloudPOS in VS and run it.

For step 4, I go back to the VS where I have my project open in step (2). If I now click on Attach to Process and choose all the w3wp.exe I get the error: 

7026.pastedimage1577143078660v1.png

This is due to the cloudPOS that I have open and clicked on run in step 3. 

If I do not attach a process for the VS where my CRT project is, then the cloudPOS session isn't recognizing any breakpoints.

Do I run cloudPOS through LCS? Will that even see the breakpoints in VS? It just doesn't make sense to me that it would.

I also make sure that I run cloudPOS in step 3 using Internet explorer because of the comment in: community.dynamics.com/.../debug-d365-retail-cpos-mpos-extensions

Any suggestions how I can test my CRT change by itself and in the end with cloudPOS to see if I reference the extension property correctly to show its value on the product search view extension I have in POS.Extensions.

  • Retha Profile Picture
    Retha 1,439 on at
    RE: How to debug CRT

    Thanks for your help Oksana. I in the end re-did my project to remove all underscores in the names of the solution and class library so that the DLL doesn't get generated with an underscore in its name. I also made sure the name of the lass library is the name of the name space inside the classes below it. I also followed the steps in this link : community.dynamics.com/.../debugging-commerce-runtime-in-the-new-dynamics-ax-ax7, diligently and the debug finally worked.

    The sequence was very important

  • Verified answer
    Oksana Kovaliova Profile Picture
    Oksana Kovaliova 3,597 on at
    RE: How to debug CRT

    CRT is a part of Retail server, that is web application. To trigger CRT, some application needs to trigger retail server first.

    POS app > Retail server > CRT

    If you start CPOS in browser and trigger product search, it will call Retail server - and your CRT extension will be triggered.

    Debugger should be attached to Retail server IIS process in this case to make things work.

  • Retha Profile Picture
    Retha 1,439 on at
    RE: How to debug CRT

    I am not using IIS. I switched my Dev box to IIS . This link: docs.microsoft.com/.../new-environments-visual-studio-teams-branch-retail-projects, suggested it in Step 4 under Prepare Development Environment.

    "

    To speed up the development experience, switch to Microsoft Internet Information Services (IIS). For instructions, see MSDyn365FO. How to switch from IIS Express to IIS on development VM. This step can be done only on the Tier 1 VM where you have administrative privileges (cloud-hosted environment).

    "

    What do I run to trigger the CRT extension if I do not use CPOS. I can't find information on the internet that is clear enough to show me how to do it. If I just press <F5> in VS to run my C# code without any executable then it tells me that a class library cannot be a startup project.

    "GetProductSearchResultsDataRequest" is not hit when I type in the search text. IT is almost as if it is not seeing my extension or I just can't figure out how to set up the debugging. It is most probably the latter

  • Oksana Kovaliova Profile Picture
    Oksana Kovaliova 3,597 on at
    RE: How to debug CRT

    Hi, which process are you attaching to? It should be w3wp process of Retail server, not w3wp process of CPOS.

    Also there is no need to use CPOS solution at all, you can attach from your CRT extension.

    If you have IISExpress running - then debugger should be attached to it, not to w3wp

    GetProductSearchResultsDataRequest - did you try to test, if breakpoint is hit when you enter search text in POS?

  • Retha Profile Picture
    Retha 1,439 on at
    RE: How to debug CRT

    I in the end figure out that I need to add CloudPOS Pos.Web to my solution that has the CRT project so that it can have an executable.

    I did that and now when I run it I go back to attach al the w3wp.exe. It attaches without a problem.

    And it runs by opening POS and I can type in a string to do product search.

    However it still doesn't run the breakpoints.

    My post trigger is type of: GetProductSearchResultsDataRequest. I need to add values to extension properties for the Product SearchView, thus the type of GetProductSearchResultsDataRequest.

    I have a breakpoint on SupportedRequestTypes, OnExecuted and OnExecuting. So it should hit at least one of them.

    I have my DLL inside RetailServer\WebRoot\Bin\Ext

    I also added it to RetailSdk\Assets\CommerceRuntime.Ext.Config.

    The RetailSdk is where my changes are and which is linked to source control,  not the one under ServiceVolume

    I even added the DLL in the end to retailServer\Webroot\Bin\CommerceRuntime.Ext.Config under the CommerseRuntimeExtensions>Composition. didn't help

    I not just entered a string for Product search, I also selected a product from the grid to get to the product details to see if it will trigger the breakpoint but nothing.

    I also on the Inventory lookup view enter a product number on the right where the Search Products control is but this doesn't trigger the break point either.

    I made sure all the w3wp.exe processes were attached. 

    Any ideas what I'm missing with the debugging?

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,407 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans