无头应用程序的问题,如何修复/调试 [英] Problem with headless app, how to fix/debug

查看:99
本文介绍了无头应用程序的问题,如何修复/调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写了两个无头应用程序写入Azure事件中心,一个使用AMQPNetLite。

I wrote two headless applications which writes to Azure Event hub, one using AMQPNetLite.

两者都使用一个计时器,它每10秒向事件中心发送一条消息。在每个发送消息上,我让LED闪烁0到0.5秒。使用第二个控制台应用程序,我可以从事件中心读取消息。当我从VS部署这两个应用程序时,我可以调试它们,
看到LED闪烁,也可以检索发送消息。看来,两个应用程序都按预期工作。

Both use a timer which sends every 10 seconds a message to the event hub. On every send message I let the LED blink vor 0,5s. With a second console application I can read the messages from the event hub. When I deploy both apps from VS I can debug them, see the LED blinking and also can retreive the send messages. It seems, both apps work as expected.

但是当我从启动时运行这些应用程序时,我确实看到LED闪烁了10秒。但是不要在事件中心发送任何消息。

But when I run these applications from startup, I do see the LED blink avery 10s. but do not any messages on event hub .

我有什么可能决定重新开始?在无头应用程序运行时,我可以以某种方式附加调试器,就像可以使用其他应用程序一样吗?​​

What possibilities do I have to determine the reasoon? Can I somehow attach the debugger while the headless app is running like it can be done with other applications?

有没有人认识到类似的问题?

Does anyone recognized a similar problem?

推荐答案

虽然我没有尝试过,但你应该可以从VS 2015连接到现有的进程。转到Debug - >附加到处理...在传输中选择远程(无身份验证),然后在限定符中输入设备的IP地址。您应该看到
设备上运行的进程列表。选择您的流程,然后单击"附加"。
Though I did not try it, you should be able to connect to an existing process from VS 2015. Go to Debug -> Attach to Process... In the Transport select Remote (no authentication) and enter your device's IP address into the Qualifier. You should see the list of processes running on the device. Select your process and click Attach.


这篇关于无头应用程序的问题,如何修复/调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆