• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Eclipse Debugging

Community Beginner ,
Apr 09, 2009 Apr 09, 2009

Copy link to clipboard

Copied

I'm using Eclipse 3.4.2 and have done some work with the Debug Perspective - running the ColdFusion 8 line-by-line debugger.  It was working fine until a day or two ago and now I just can't get it started up again.  Everything is running on a Windows XP (SP2) machine.

My RDS Connection is OK - I can still go into the RDS Configuration dialogue, click "Test Connection" and get a successful response.  But when I click "Test Debugger" the response is:

Test Debugger Failed


The debugger server is currently listening on port xxxx.


This port is not the debugger port set in the Cold Fusion Administrator.  This port is selected randomly each time the debugger server starts.

I've checked all my CF Administrator settings and re-started the Cold Fusion several times.  As the message suggests, port "xxxx" is a different number each time I recycle ColdFusion.  I've also tried everything I can think of in the "Debug home page URL" of the debugger launch settings.  (A couple of articles I've read say that you should use a port number in that URL)  When it worked, I was using no port number at all.  And I've tried the port number of the web server, the "Debug" port number in my ColdFusion Admin settings, the port numbers that have popped up in those error messages, and 8500 - which at least one article said is the default.

I tried re-booting (of course) and even unzipping a fresh copy of Eclipse and re-installing the CFEclipse plugin as well as the Adobe CF801 Extensions, basically undoing and then re-doing everything.  Also, re-created my entire workspace, in hopes that some setting in that might have hosed things up.

The available documentation is fairly adequate in terms of setting out baby steps to follow to get things working but offers little insight that might help troubleshoot when things don't work exactly like the screen shots. For example, I can't seem to find any documentation that sheds any light on exactly what the statement "This port is not the debugger port set in the Cold Fusion Administrator" means.  Is this saying that the random port number and the CF Admin port number should be the same (tried that) or is it saying that it should not be (tried that, too)?.  If it's the latter, that would suggest that you have to reconfigure the launch settings each time the random port number changes (tried that).

And Eclipse must be accessing a server-side debugging service to obtain instruction locations and variable references, etc. to support its breakpoints and variable value displays, hence the "Debug home page URL".  But the doc. only says to stick a default port number in there. 

I'd really appreciate any insights anyone has to share.

Thanks in advance.

TOPICS
Getting started

Views

4.7K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 11, 2009 Apr 11, 2009

Copy link to clipboard

Copied

The line debugger runs as a process separate from the Coldfusion server. You may therefore assign it its own port.

On the Debugger Settings page in the Administrator, accept the default settings, namely

(checked) Allow Line Debugging 
Debugger Port: 5005 
Maximum Simultaneous Debugging Sessions: 5

Then click on the button to submit the changes. Next, open the port 5005 in the Windows XP firewall, as follows:

1. Click on Start and then on Control Panel
2. Click on Windows Security Center
3. Click on Windows Firewall to open the firewall
4. Click on the Exceptions tab
5. Click on Add Port
6. In the Name field, type a name, for example, CF_LineDebugger
7. In the Port number field, type 5005
8. Press OK and you're done.

Restart Coldfusion. Restart Eclipse.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 20, 2009 Apr 20, 2009

Copy link to clipboard

Copied

Thanks for the suggestion but, since my machine is behind a corporate firewall, Windows Firewall is switched off.  I, of course, had already configured ColdFusion debugging to use port 5005, and checked "Allow Line Debugging" because that's what all the articles say to do.  (Is there some particular rationale for using 5005?  That doesn't seem to be documented anywhere.  It seems like that's what everybody does just because that's what everybody does.  Some authors do point out that whatever port you use cannot be in use for anything else but I haven't found any suggestions yet for determining what is in use and what isn't at any given point in time.)

While there might be some slight possibility that some corporate "Big Brother" locked down a port on my local IIS, it doesn't seem like a port being blocked by any firewall was the problem.  For one thing, line debugging was working before.  In fact, when I do "Test Debugger" in the Eclipse RDS Configuration dialog, IIS shows a successful POST (code 200) in the log - this is whether or not Eclipse reports the test as successful.  So whatever port is actually being used, IIS is receiving the request and acting upon it.

Is it possible that "Test Debugger" issues a POST via the port IIS listens on (80, the deafult, in my case) and that request somehow is re-routed to another port?  Like most of this stuff, the "Test Debugger" feature is basically undocumented.  What does that do anyway?  One thing I have learned during these hours of trial and error is that if "Test Debugger" works, you have a prayer of being able to actually use the debugger - otherwise NOT.  Beyond that, little explanation is available.

What does seem to work (at least some of the time)  is this:  1) Run "Test Debugger" and see what port was randomly selected.  2) Go into the Cold Fusion Administrator and reconfigure debugging to use that port.  3) Restart the main Cold Fusion Service (ColdFusion 8 Application Server).  4) Set the value for "Debug Home Page URL" to "help:about".

Matching the two port numbers, of course, does make some logical sense.  But I still see no logic behind the "Debug Home Page URL" setting or any means of making an informed decision about what to do with it.  In fact, my latest round of experimentation suggests that this setting doesn't really do anything except foul things up unless you, in effect, disable it.  This, too is undocumented.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 22, 2009 Apr 22, 2009

Copy link to clipboard

Copied

Hi getoverit,

you describing exactly the same problem i am facing. I think the behaviour coldfusion server does randomly select a port for debugging is inacceptable. Why its not using the same port you tell in admin panel? Your solution is more than a workaround.

Consider you have to ask your corporate's admin everytime to open some port that coldfusion was thinking of is cool at this time.

when you find another solution to this issue, please tell me, for now i will try to contact adobe.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 03, 2009 Jun 03, 2009

Copy link to clipboard

Copied

I was running into this same problem.  After I little googling, I came across this post:

     http://www.oscararevalo.com/index.cfm/2007/10/21/Changin-CF8-Debugger-Port

Although the post describes a completely different problem, I noticed this line:

-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005

When I looked in my jvm.config file, I did not have either of those arguments on my "java.args=" line.

I added those arguments (notice the address=5005).  After doing so, I restarted JRun and Eclipse.  Now when I click "Test Debugger" in the Eclipse "RDS Configuration" preferences, I no longer see the "random port" error message- I see "Test debugger was successful".

Hope that helps

The -Xdebug and -Xrunjdwp appear to be the necessary "Java Debugger" arguments to ensure you use port 5005:

     http://java.sun.com/j2se/1.3/docs/tooldocs/win32/jdb.html

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 23, 2009 Sep 23, 2009

Copy link to clipboard

Copied

Also, another thing I did to stop the "random port" problem, was disable the "JRun Admin Server" from starting automatically in my services console.  If that starts before the "JRun CFusion Server", it appears to hold the debugging port (rather than the CFusion server)...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 28, 2012 Aug 28, 2012

Copy link to clipboard

Copied

What worked for me was a two-step process:

  1. Jeff S's  note on adding args to the jvm.config file
  2. A reference from another thread on uncommenting the two RDS sections in your web.xml file; see http://www.mickgenie.com/tag/configuration-file/

After configuring things in CF Admin and CF Builder, and performing those two UNDOCUMENTED steps, the Test Debugger button in Window > Preferences > Adobe > RDS Configuration says it worked.

I had abandoned Eclipse several years ago in favor ofr JetBrains' IDEA IDE, which I find much more productive. But today, I really wished for a debugger, which that unfortunately doesn't have, so I thought I'd try the standalone version of ColduFusion Builder, Eclipse and all. My thought was that if Adobe released it as a real paid product, many of the rough edges would be gone. This experience was very dissapointing, requiring hours of googling and trying things just to get to the point where a self-test succeeds. Honestly, either something about my setup is weird enough that no standard configuration instructions would be sufficient (no evidence of that), or the product and/or its documentation are very unfinished, at least in this area. That's fine for open-source freeware, but this is a real product, and it just doesn't cut it IMO.

Not to mention that although the self-test reports that things are working, I'm unable to actually have a break point triggered when I access that page in a browser. I'm sure that's due to some other configuration I didn't get right, but I'm out of time and patience, for now.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 28, 2012 Aug 28, 2012

Copy link to clipboard

Copied

LATEST

Quick follow-up: After restarting CFB yet again, changing nothing else, my breakpoints started working. So at this point I'd say that the config setup and docs (including the video Adobe took the trouble to make that doesn't mention those other steps) aren't so great, but at least the intended functionality does work for me.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 27, 2010 Feb 27, 2010

Copy link to clipboard

Copied

Hi,

I am facing the same problem now. it was working before a couple of days, but now its the same problem as yours. Did you figure out what is the problem. Please let me know of the solution.

Thanks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 04, 2010 Mar 04, 2010

Copy link to clipboard

Copied

Did you ever get this worked out?

Try stopping following service if it is running: "Macromedia JRun Admin Server".

Also, notice from the CFIDE page (Debugging & Logging -> Debugger Settings):

Under Allow Line Debugging, you will see "Debugger Port".  Notice comment:

You must specify this debugger port in the JVM settings of your application server, for example:
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005, and restart the server.

Make sure that line is in your jvm.config (the java.args line) file and restart your server.  Those are the steps I took to enable debugging.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 04, 2010 Mar 04, 2010

Copy link to clipboard

Copied

yaa got it working.

Thank you

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation