Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

Debugging X++ from EP

Posted on by 593

Hi I tried all possible Options to debug my Code called from EP but no Chance. tried to debug the Code on the Server the IIS is running, tried it on the AOS, no breakpoint is hit. 

logged into AX with BC User, logged in as admin….on both Servers. Nothing helped

My Problem. I do accept purch inquiry in the Vendor Portal (EP). in my AX after doing so there is some Code to automatically post the confirmation. before that there is a check in PurchFormletterProvider class (method checkHeading) which I like to debug but it never hits the breakpoint there.

Any suggestions what I can try as well?

  • CRSW Profile Picture
    CRSW 593 on at
    RE: Debugging X++ from EP

    Hello

    I was able to debug now, but only If I am logged in at EP with my account not with the one who generates the error.(VendVendor Role) which is an external vendor user to accept inquiries in the vendor portal

    In this case everything is fine as well

    It happens only if the external Vendor portal user (with relation to the order account vendor) accepts the inquiry.

  • Sunnyw Profile Picture
    Sunnyw on at
    RE: Debugging X++ from EP

    CRSW, looks like you post the error via https://community.dynamics.com/ax/f/microsoft-dynamics-ax-forum/381904/ep-vendor-portal-error-acecpting-purchase-inquiries already.  If this happens only in EP but not AX client, AX trace is probably could help by capturing both 'success' and 'fail' capture to compare to start.  It is difficult to efficiently assist you via forums.  Again, please establish support incident so we can assist you further especially to explore debugging as well as alternative in your scenario so we can take closer look.  

  • CRSW Profile Picture
    CRSW 593 on at
    RE: Debugging X++ from EP

    Maybe I do missunderstood s.th.

    here my Scenario.

    I use the Vendor Portal (ep) and do accept the Purchinquiries. with this my Code in AX automatically Posts the PO Confirmation (FormletterService) here I would like to debug because this Fails from EP but not from AX if PO invoice account is different from order account

  • Sunnyw Profile Picture
    Sunnyw on at
    RE: Debugging X++ from EP

    It adds large number of parameters in spread environment whenever networking and remote is involved.  It seems that you would only like or can troubleshoot in particular environment (live perhaps).  If you have to debugging in this spread environment, you may want to establish support incident to have closer look.

    Alternatively, if you are interested in knowing more about the 'unexplainable error' debugging or not, you may want to give AX trace a shot, see blogs.msdn.microsoft.com/.../

  • CRSW Profile Picture
    CRSW 593 on at
    RE: Debugging X++ from EP

    No one box available for that error I want to check.

    It is an unexplainable error in the vendor portal

  • Sunnyw Profile Picture
    Sunnyw on at
    RE: Debugging X++ from EP

    CRSW, I also do not recall having it working on spread environment.  Do you have all-in-one box to use?  Or would you consider other alternatives like AX trace and 'trace debugging?'

  • CRSW Profile Picture
    CRSW 593 on at
    RE: Debugging X++ from EP

    I did everything as discribed in the docs and I tried a lot different other things (I am in a spread environment)

    Nothing worked 

  • Suggested answer
    Sunnyw Profile Picture
    Sunnyw on at
    RE: Debugging X++ from EP

    Hi CRSW,

    You can refer to https://docs.microsoft.com/en-us/dynamicsax-2012/developer/how-to-debug-x-code-on-ep-pages to setup debugging via business connector.  I don't recall having it work in remote environment though but all-in-one box where IIS/Sharepoint/AOS/AX client/debugger are installed on.

    AX trace could be another easier alternative although it is not really debugging but for profiling.  Another option if you still have difficulty debugging X++ code from EP/business connector interactively is in your DEV/refresh box with replication, you can 'trace debugging' by dumping out things like variables into file system or event viewer log on particular code like in class\PurchFormletterProvider\checkHeading() by modifying the X++ code as well although it is not as elegant as debugging but could fit your purpose.  Classes\SysWorkflowHelper\writeEventLogEntry() is standard class you can use quick.

  • Sergei Minozhenko Profile Picture
    Sergei Minozhenko 23,089 on at
    RE: Debugging X++ from EP

    Hi CRSW,

    Have you completed all steps from MS docs instruction? docs.microsoft.com/.../how-to-debug-x-code-on-ep-pages

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans