当我尝试调试我的插件时,几秒钟后显示以下错误“已连接调试器,不支持调试 petrel 启动。请分离调试器”。请帮我解决这个问题
2 回答
What is the reason you want to start Petrel from a VS with an attached debugger?
1) If you want to be able to use the VS "Edit and Continue" feature, your only option is the 32-bit developer's build of Petrel (you will need an Ocean license).
2) If you are trying to debug your plug-in initialization, you could add the following statement to the code you want to debug
#if DEBUG
System.Diagnostics.Debugger.Launch();
#endif
This will attach a debugger if you are running a debug build of your plug-in
DR
当您运行 x64 位版本的 Petrel 时,这是预期的行为。你有两个选择;1)获取 32 位版本的 Petrel,或者 2)在你的插件中创建一个 msgbox,并在弹出的时候将 VS 附加到 petrel.exe 进程。