ANTLR “Cannot launch the debugger. Time-out waitin

2019-06-23 01:55发布

One of my ANTLR grammars running in AntlrWorks throws: “Cannot launch the debugger. Time-out waiting to connect to the remote parser.”

In the past this message usually goes away but this one is persistent. On searching the ANTLR lists (e.g. http://www.antlr.org/pipermail/antlr-interest/2009-June/034659.html) there are hints that the error message is nothing to do with what it seems but could be a grammar error.

Has anyone got tips as to how to "reboot" or find the bugs in this situation?

2条回答
别忘想泡老子
2楼-- · 2019-06-23 02:38

I've found that the Windows firewall rules can really interfere with the debugger, so make sure you haven't set it to block the Java VM.

Also, try waiting a bit and then choosing the "Debug Remote" option, often the debugger just takes a little while and the main process times out, but the debugger does still come up.

查看更多
来,给爷笑一个
3楼-- · 2019-06-23 02:41

It may or may not relate - but we got rid of the problem as follows:

On a UNIX box it didn't occur. On Windows it did. There were two parser rules that differed by case (e.g. myfoo and myFOO). When they were resolved the error went away.

I updated the ANTLRworks but the error persisted until we "solved" it as above.

查看更多
登录 后发表回答