msquic icon indicating copy to clipboard operation
msquic copied to clipboard

Platform Datapath WinDBG support in test.ps1

Open ProjectsByJackHe opened this issue 2 months ago • 5 comments

Describe the feature you'd like supported

Today, it's a clunky process for how you debug MsQuic. Yes, test.ps1 supports -debugger option but unfortunately none of the breakpoints set in the datapath modules under /platform get triggered.

ALSO, the watchdog timeout firing mid-debug is annoying, and it would be best if test.ps1 configured the watchdog.

The main issue is the number of datapaths MsQuic supports and the varying steps one needs to take to set up their environment for debugging.

It always ends up having to copy+paste tons of boilerplate and setting up WinDBG with the raw executable path + arg gibberish.

ASKS:

  • able to set breakpoints in /platform modules and have it work
  • persist breakpoints between new test runs
  • adjust watchdog timer in test.ps1 so you don't get pre-empted.

Proposed solution

Fix this issue so breakpoints set in /platform can get triggered.

Additional context

No response

ProjectsByJackHe avatar Oct 04 '25 02:10 ProjectsByJackHe

@anrossi says there is already a -debugger and -initialbreak option. Closing for now, please re-open with more details if there is a problem with them.

guhetier avatar Oct 07 '25 18:10 guhetier

The breakpoints set in the /Datapath modules do not get triggered.

ProjectsByJackHe avatar Oct 07 '25 22:10 ProjectsByJackHe

That seem like a different issue, if the debugger was attached to the process. There are multiple reasons why a breakpoint might not get triggered even if the debugger is attached, generally due to loading the right symbols / setting the breakpoint correctly. Can you clarify what platform / which datapath you are trying to attach to?

guhetier avatar Oct 08 '25 00:10 guhetier

Datapath_xplat is shared amongst all datapaths, which is where I set my breakpoints.

Setting breakpoints in /core hits, and I can step into them to get into Datapath_xplat, but all breakpoints set in Datapath_xplat does not get triggered unless it's stepped into via core.

At the very least, we should find a way to persist the breakpoints between test runs, which gets cleared out. Also deal with the annoying watchdog timeout.

ProjectsByJackHe avatar Oct 08 '25 19:10 ProjectsByJackHe

Persisting breakpoints, etc... is a debugger feature, not something that is relevant to the script IMO. For the breakpoints not hitting in datapath_xplat - it would be interesting to understand what happens, but same thing, I don't think the test script can do anything about it.

guhetier avatar Oct 08 '25 19:10 guhetier