Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WinDBG not able to read symbol path string set with the _NT_SYMBOL_PATH environment variable

I have set the environment variable _NT_SYMBOL_PATH to the below value

SRV*C:\My\Sym*http://msdl.microsoft.com/download/symbols

I have also made sure that the directory C:\My\Sym actually does exist. However when I start up WinDBG it does not pick up the Symbol path string I have setup in the _NT_SYMBOL_PATH environment variable. The symbol path in WinDBG is empty.

When I check the environment variable from the command line, I can see the above environment variable set correctly.

I don't understand what I am missing. Can anyone please help? I know that I can set the path in WinDBG directly but I am interested in understanding why the environment variable is not working.

like image 709
Tushar Jadhav Avatar asked Nov 20 '25 16:11

Tushar Jadhav


1 Answers

I solved the problem by myself. This should be useful to anyone who encounters this issue.

I was trying to do the following.

  1. Installed Window Debugging Tools on my fresh laptop.
  2. Set the _NT_SYMBOL_PATH environment variable.
  3. Spinned up WinDBG and clicked on File -> Symbol File Path to bring up the Symbol Search Path. I was expecting the symbol search string I specified in the environment variable to show up here.

Note: I did not start a WinDBG session.

Solution: Start WinDBG session by debugging anything. I debugged C:\Window\System32\Notepad.exe which I think forces WinDBG to load the string from the environment variable. I then opened the Symbol Search Dialog again by clicking File -> Symbol File Path

VOILA !!! Now I can see the string populated.

Conclusion: WinDBG does not populate the Symbol Search dialog unless you start debugging something.

like image 145
Tushar Jadhav Avatar answered Nov 23 '25 11:11

Tushar Jadhav



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!