[英].pdb files not available when debugging Visual Studio Extension
[Environment: W10 x64 Pro v. 20H2, Visual Studio Pro 2019 16.9.4] [环境:W10 x64 Pro v. 20H2,Visual Studio Pro 2019 16.9.4]
I am attempting to debug an open source project, which is a Visual Studio Extension ( AnkhSVN2019 ) and am able to start a VS Extension Debug session where my modified code is being executed.我正在尝试调试一个开源项目,它是一个 Visual Studio 扩展( AnkhSVN2019 ),并且能够启动一个 VS 扩展调试 session 正在执行我修改的代码的地方。
However, any breakpoints I set in the code are disabled at runtime, and when I mouse over the disabled breakpoint, I get the message但是,我在代码中设置的任何断点在运行时都被禁用,当我将鼠标悬停在禁用的断点上时,我会收到消息
The breakpoint will not currently be hit. No symbols have been loaded for this document.
When I am in the debug session, and I open the Modules window (Debug -> Windows -> Modules), I see that my dll I am interested in is loaded and located at c:\users\conrad\appdata\local\microsoft\visualstudio\16.0_b1ddb83bexp\extensions\extensions-16.0_b1ddb83b\wyo52n3q.czx\Ankh.UI.dll
. When I am in the debug session, and I open the Modules window (Debug -> Windows -> Modules), I see that my dll I am interested in is loaded and located at
c:\users\conrad\appdata\local\microsoft\visualstudio\16.0_b1ddb83bexp\extensions\extensions-16.0_b1ddb83b\wyo52n3q.czx\Ankh.UI.dll
。 (It is indeed there.) There is no Ankh.UI.pdb
in that directory though. (确实存在。)但该目录中没有
Ankh.UI.pdb
。 Some hopefully relevant observations:一些希望相关的观察结果:
Ankh.UI.pdb
does exist in the ...\bin\Debug\
dir of the projectAnkh.UI.pdb
确实存在于项目的...\bin\Debug\
目录中C:\Users\conrad\AppData\Local\Microsoft\VisualStudio\16.0_b1ddb83bExp\Extensions\Phil Jollans\AnkhSVN2019\1.0.12\
but no.pdb files in that dir either (Phil Jollans is the owner of AnkhSVN2019 on github)C:\Users\conrad\AppData\Local\Microsoft\VisualStudio\16.0_b1ddb83bExp\Extensions\Phil Jollans\AnkhSVN2019\1.0.12\
中有一个更新的 Ankh.UI.dll那个目录(Phil Jollans 是 github 上 AnkhSVN2019 的所有者) Back in the Modules window, if I right-click on the Ankh.UI.dll line and choose Symbol Load Information… , a dialog opens with the following information:回到Modules window 中,如果我右键单击 Ankh.UI.dll 行并选择Symbol Load Information... ,将打开一个包含以下信息的对话框:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\Ankh.UI.pdb: Cannot find or open the PDB file.
c:\users\conrad\appdata\local\microsoft\visualstudio\16.0_b1ddb83bexp\extensions\extensions-16.0_b1ddb83b\wyo52n3q.czx\Ankh.UI.pdb: Cannot find or open the PDB file.
C:\AnkhSVN2019\src\Ankh.UI\obj\x86\Release\Ankh.UI.pdb: Cannot find or open the PDB file.
C:\Windows\Ankh.UI.pdb: Cannot find or open the PDB file.
C:\Windows\symbols\dll\Ankh.UI.pdb: Cannot find or open the PDB file.
C:\Windows\dll\Ankh.UI.pdb: Cannot find or open the PDB file.
(btw there is no C:\AnkhSVN2019\
directory.) (顺便说一句,没有
C:\AnkhSVN2019\
目录。)
What am I missing here?我在这里想念什么?
I have download this project, but how do you debug this project?我已经下载了这个项目,但是你如何调试这个项目?
I use below steps to debug it, the breakpoint(Ankh.UI) can be hit, and Ankh.UI pdb file can be loaded.我使用下面的步骤来调试它,可以打断点(Ankh.UI),并且可以加载 Ankh.UI pdb 文件。
Debug
pageDebug
页面Start Action
to Start external program
with "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\devenv.exe"Start Action
更改为使用“C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\devenv.exe” Start external program
/rootsuffix Exp
in Command line arguments/rootsuffix Exp
Got this list of sufficient (although maybe not completely necessary) steps from the Extension owner to get my environment in a state where the Extension is debuggable:从扩展所有者那里获得了足够(尽管可能不是完全必要)步骤的列表,以便在扩展可调试的 state 中获取我的环境:
This list of steps is IMO completely crazy and shouldn't be necessary to debug an Extension.这个步骤列表是 IMO 完全疯狂的,不应该是调试扩展所必需的。 Can't tell if this is a VS shortcoming or due to the Extension being poorly architected.
无法判断这是 VS 的缺点还是由于扩展架构不佳。 But at least now I can debug it.
但至少现在我可以调试它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.