Raspberry Pi Debug [英] Raspberry Pi Debug

查看:76
本文介绍了Raspberry Pi Debug的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello group,

Hello group,

我在Pi上调试时遇到问题我可以点击断点但是debug.writeline语句不起作用。

I am having a issues with debugging on a Pi I can hit breakpoints but the debug.writeline statements are not working.

当我调试在本地PC上运行时,它们运行正常。   

They run fine when i debug running on local pc.   

这使我很难解决我遇到的问题。

This is making it hard to fins a problem that i am having.

一段代码在本地机器上运行完美但是当我在PI上运行它时它不起作用。

A block of code runs perfect on local machine but when i run it on the PI it does not work.

我正在尝试使用PI的本地环回来获取网络信息。我在应用程序中的页面使用此信息。当我运行这个代码块时,本地机器替换PI i的IP它似乎工作。

I am trying to use the PI's local loopback to get the network info. I am using this information for pages within the app. When i run this block of code form the local machine substituting the IP of the PI i it appears to work.

然而,在PI本身上运行它会失败。

However running on the PI itself it fails.

StreamReader SR = await GetJsonStreamData("http://localhost:8080/api/networking/ipconfig"); String JSONstring = SR.ReadToEnd(); RootObject adaptor = JsonConvert.DeserializeObject<RootObject>(JSONstring); Debug.WriteLine("Number of adaptors is: " + adaptor.Adapters.Count.ToString()); // for (int i = 0; i < adaptor.Adapters.Count; i++) for (int i = 0; i < 3; i++) { Adaptor_Description[i] = adaptor.Adapters[i].Description.ToLower(); Adaptor_HardwareAddress[i] = adaptor.Adapters[i].HardwareAddress; Adaptor_DefaultRouter[i] = adaptor.Adapters[i].Gateways[0].IpAddress; Adaptor_IPAddress[i] = adaptor.Adapters[i].IpAddresses[0].IpAddress; Adaptor_SubnetMask[i] = adaptor.Adapters[i].IpAddresses[0].Mask; }

它几乎就像本地环回一样无效。

Its almost like local loopback is not working.

任何建议?

推荐答案

Hello CMCTS, 

Hello CMCTS, 

在PI上测试代码块时,是否在PI上部署了Web服务器(http:// localhost:8080)?

Had the web server(http://localhost:8080) been deployed on the PI when you tested the block of code on PI?

如果它已部署在本地计算机上,则应使用本地计算机的IP地址 localhost ,然后检查防火墙和
<您的UWP应用程序的href ="https://docs.microsoft.com/en-us/uwp/schemas/appxpackage/appxmanifestschema/element-capability">
功能。

If it was deployed on your local machine,you should use the IP address of your local machine instedd of localhost, and then check the firewall and the Capabilities of your UWP app.

最好的问候,

Michael


这篇关于Raspberry Pi Debug的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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