Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WinDbg slow when debugging local process (step over)

This is really driving me crazy. I am using WinDbg as my primary debugger. It is used to debug local service (WinDbg running locally, debugging service on the same machine). The PDB files are stored on local hard drive. Source code is accessed via SMB share.

Debugging works in bursts, sometimes it flow well, most of the time I keep seeing the unbelievably annoying "*BUSY*" message, this happens almost every time when I perform a "step-over".

Any ideas what I could do to speed things up?

Thanks

like image 215
Grim Avatar asked Apr 23 '26 11:04

Grim


2 Answers

This may happens if you have many unqualified breakpoints that track module load events (created via bu) saved in your workspace.
Also it is worth to check network connection and local symbols cache size

like image 95
capone Avatar answered Apr 26 '26 02:04

capone


I was having the exact same problem, and was able to see a big improvement by adjusting the symbol options. Specifically, the SYMOPT_NO_PUBLICS option seemed to be the most important, but I adjusted a few other related options. I did the following...

.symopt-0x4 .symopt+0x100 .symopt+0x8000 .symopt-0x10000

...which is:

-SYMOPT_DEFERRED_LOADS +SYMOPT_NO_UNQUALIFIED_LOADS +SYMOPT_NO_PUBLICS -SYMOPT_AUTO_PUBLICS

After all that, I had a symopt bit mask value of 0x80028333, which I now use as a WinDbg command line option, as in:

windbg.exe -sflags 0x80028333

I haven't yet discovered if there is any downside to this approach. Perhaps there are some cases where using SYMOPT_NO_PUBLICS results in missing information, but it's been working well for me thus far, and it's definitely way faster.

WinDbg Symbol Options MS Documentation

like image 24
Huge Larry Avatar answered Apr 26 '26 01:04

Huge Larry