简体   繁体   English

确认:我可以在保持 TCP 套接字打开的同时调试应用程序吗?

[英]Confirmation: can I debug an application while keeping a TCP socket open?

This question is just a confirmation question:这个问题只是一个确认问题:

I'm working on a multi-threaded C# application, based on TCP sockets.我正在开发一个基于 TCP 套接字的多线程 C# 应用程序。
The connection looks unstable: it happens regularly that the connection falls after a while.连接看起来不稳定:连接经常会在一段时间后断开。 I'm currently doing quite some tests, using breakpoints and single-stepping, using Visual Studio.我目前正在使用 Visual Studio 进行一些测试,使用断点和单步执行。 I would like to be sure that the unstable connection is not simply caused by the fact that I'm debugging my application, hence this confirmation question:我想确定不稳定的连接不仅仅是因为我正在调试我的应用程序,因此这个确认问题:

Can hitting a breakpoint and doing some single-stepping cause a TCP socket connection to fail?遇到断点并执行一些单步执行会导致 TCP 套接字连接失败吗?

You can use something like Tracepoints to print dynamically information based on expressions/conditions.您可以使用Tracepoints 之类的东西根据表达式/条件动态打印信息。 These won't block the currently executing thread so should work for something like this.这些不会阻塞当前正在执行的线程,所以应该适用于这样的事情。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM