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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Issue with debugging Copilot Agent Session via VS Code

(6) ShareShare
ReportReport
Posted on by 56

Hi all,


We are attempting to debug an Agent Copilot session; however, no breakpoints are being hit when attaching to an Agent session.

We have already followed the guidance in Stefano Demiliani’s article:

https://demiliani.com/2025/10/21/dynamics-365-business-central-debugging-agent-sessions/

Despite this, we are still unable to debug Agent sessions.

Any assistance would be greatly appreciated.

I have the same question (0)
  • Suggested answer
    OussamaSabbouh Profile Picture
    12,965 Super User 2026 Season 1 on at
    Hello,
     
    In SaaS sandboxes, Agent/Copilot sessions typically run as background sessions, and the attach debugger has limitations there — you can reliably break only on supported session types (mainly WebServiceClient in sandbox). If your agent runs as a background/child session, you can attach but breakpoints won’t hit. Make sure you’ve published the exact build with Ctrl+F5 before attaching, and if needed use breakOnNext = WebServiceClient and route the logic through a web service call for debugging. Also verify sessionId/userId usage and that you have D365 ATTACH DEBUG if debugging on behalf of another user. In short: it’s usually session type + sandbox limitations, not your breakpoints.
     
    Regards,
    Oussama Sabbouh
  • Suggested answer
    Nimsara Jayathilaka. Profile Picture
    4,950 Super User 2026 Season 1 on at
    Hi
     
    I think In SaaS sandboxes, Agent sessions run as background sessions where breakpoints won't hit.
     
    Thanks
    Nimsara
  • Suggested answer
    YUN ZHU Profile Picture
    99,086 Super User 2026 Season 1 on at
    Hi, This appears to be a new feature in Business Central 2026 release wave 1 (BC28), you can wait a little longer.
     
    Thanks.
    ZHU

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,005 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,148 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 557 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans