简体   繁体   English

在Visual Studio中自动化DLL调试“附加到进程”?

[英]Automating DLL Debugging “attach to process” in Visual Studio?

I'm writing an SNMP extension agent DLL for Windows. 我正在为Windows编写SNMP扩展代理DLL。

Is there a way to automatically attach the DLL to the SNMP service each time I want to test/debug? 是否有一种方法可以在每次我要测试/调试时自动将DLL附加到SNMP服务?

This is a very tedious and time consuming process, as I currently have to stop the SNMP service, compile, restart the service and then attach the process. 这是一个非常繁琐且耗时的过程,因为我目前必须停止SNMP服务,进行编译,重新启动该服务,然后附加该过程。 I'm trying to automate it more. 我正在尝试使其更加自动化。

This may be what you want to have a look at. 可能是您想要看看的。

Visual Studio debugger offers some command line option to attach to running process. Visual Studio调试器提供了一些命令行选项以附加到正在运行的进程。 You can probably write a Python script to enumerate running processes and attach the debugger to the service. 您可能可以编写Python脚本来枚举正在运行的进程并将调试器附加到服务。 I think you need admin priviledge to do that. 我认为您需要管理员权限才能执行此操作。

.Net has a convinient Debugger.Launch(), but I can't find an equivalent for the native. .Net有一个方便的Debugger.Launch(),但我找不到与本机等效的产品。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Visual Studio 代码:附加到 Unity 进程以调试基于 C++ 的 dll - Visual Studio Code: Attach to Unity process for debugging C++ based dll Visual Studio 2005中的“附加到进程” - “ Attach to Process ” in Visual Studio 2005 无法将matlab.exe进程附加到visual studio 2013以调试mex文件? - Unable to attach matlab.exe process to visual studio 2013 for debugging mex files? 视觉工作室。 如何通过附加到进程来构建调试工作的DLL(在命令行中)? - Visual Studio. How to build DLL (in commandline) that debugging works by attaching to process? 无法附加到使用Visual Studio 2005创建的进程 - Unable to attach to created process with Visual Studio 2005 从 Visual Studio 中的 ctypes 进行远程 DLL 调试 - Remote DLL Debugging from ctypes in Visual Studio 使用Visual Studio调试注入的DLL无法正常工作 - Debugging injected DLL with Visual Studio not working 调试在Visual Studio中使用CreateProcess生成的进程 - debugging a process spawned with CreateProcess in Visual Studio 如何将 Visual Studio 附加到 Unity 以调试本机 dll? - How to attach Visual Studio to Unity in order to debug a native dll? 我应该为 Visual Studio 2017 选择哪个附加到进程? - Which attach to process should I choose for visual studio 2017?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM