简体   繁体   English

openHAB规则:是否有一个IDE提供针对openHAB规则的编译时错误?

[英]openHAB rules: Is there an IDE that gives compile-time errors for openHAB rules?

I use Visual Code, when I save the files they are compiled in the running openHAB instance, and if I'm logged in and do log:tail I see the errors. 我使用Visual Code,将文件保存在正在运行的openHAB实例中时进行编译,如果我已登录并执行log:tail,则会看到错误。 I would prefer having errors appear in an IDE. 我希望在IDE中出现错误。 Is that currently possibly with any IDE? 当前是否可以在任何IDE中使用?

I suspect you haven't installed the openHAB extension or you haven't configured it properly. 我怀疑您尚未安装openHAB扩展程序或未正确配置它。 See the configuration instructions for the VSCode openHAB extension for details. 有关详细信息,请参见VSCode openHAB扩展的配置说明 The important thing is that the extension connects to a running instance of openHAB to check your code as you type. 重要的是该扩展连接到正在运行的openHAB实例,以在您键入时检查您的代码。 The extension literally uses the same parser that OH uses to load and parse the files so you will see all the same errors and get better code completion when the extension connects to a running OH instance. 该扩展实际上使用了与OH用于加载和解析文件的解析器相同的解析器,因此当扩展连接到正在运行的OH实例时,您将看到所有相同的错误并获得更好的代码完成。 Make sure you have the openHAB:host parameter properly set and port 5007 on the openHAB host is accessible by the machine running VSCode. 确保正确设置了openHAB:host参数,并且运行VSCode的计算机可以访问openHAB主机上的端口5007。

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

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