前言
現在專案中常常會使用到第三方的套件,之前想要 Debug 它時,需要將這個套件的 Source Code 加入到方案之中,並加入專案參考來 Debug。
另一個簡單的方式則是 啟用來源連結(Source Link),讓 Visual Studio 依套件所對應的 Source 載入來 Debug。
設定
工具 => 選項 => 偵錯 => 一般 ,取消勾選 啟用 Just My Code,勾選 啟用來源支持

工具 => 選項 => 偵錯 => 符號 ,設置符號檔(.pdb)的位置及自動載入符號喜好設定
網路的自動載入符號喜好設定大多設定為載入所有模組,但如果遇到大專案時,將會載入很久。
所以可以改設定只載入指定模組,而在 指定包含的模組中加入要 Debug 的 DLL。

例如上面我加入 Newtonsoft.Json.dll 來 Debug。
在程式碼 JsonConvert.SerializeObject 設定中斷點

再按下 F11 就可以 Debug 進 Newtonsoft.Json.dll 之中,

參考資料
The fastest way do debug .net code without sources.
Using Source Link in .NET projects and how to configure Visual Studio to use it.