1

I'm using ANTLR IDE plugin for Eclipse (Helios R2) on Windows 7 and I'm trying to debug via the Interpreter using the Debug (Java) button, but I'm getting the following error:

Execution was cancelled

Reason:
Unable to connect to ANTLR Debugger

Connection refused: connect

I've tried running Eclipse as Administrator with the firewall turned off but that makes no difference, has anyone come across this before?

Also the Run (Java) works sometimes but it can also come up with the same issue.

Cheers Carl

4
  • Using Java VisualVM I can see a process launched when I run the debug, the process is called org.deved.antlride.runtime.LaunchParser, I guess its failing to connect to this process for some reason. Jun 21, 2011 at 21:34
  • Perhaps firewall issues? If you try the stand-alone ANTLRWorks debugger (so not as an Eclipse plugin!), does the same happen?
    – Bart Kiers
    Jun 22, 2011 at 8:12
  • ANTLRWorks debugger works fine, is TCP used to connect to the debugger? Jun 22, 2011 at 10:03
  • I have never looked at it, but I imagine the connection is done through a (Java) Socket, so yes, TCP is used.
    – Bart Kiers
    Jun 22, 2011 at 10:08

1 Answer 1

1

After the ANTLR error, I can hit Run and I was getting an ArrayIndexOutOfBoundsException from LaunchParser's constructor (see source here - http://antlrv3ide.svn.sourceforge.net/viewvc/antlrv3ide/trunk/org.deved.antlride.antlr-runtime/src/main/java/org/deved/antlride/runtime/LaunchParser.java?revision=948&view=markup)

There was a space in the path to the test case file location, which was not being escaped, and the path was being split into an extra argument. If I change the path to somewhere that doesn't have a space, I don't get the exception.

2
  • You could be onto something there, as it happens my path to my file also has a folder named with a space in it. I'll move the project so there are no spaces in the path and see what happens. Jun 23, 2011 at 21:18
  • @EraserHead IRL, have you had any luck? Jun 27, 2011 at 22:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.