Charlie, thanks a lot. That was it. I put the 2 args on different lines and
debug starting working. Sorry for the delay in my response. Like you said,
this is something only few ppl might have blogged or have experience with.
I jumped on this because I wanted to try out tomcat setup plus CF X will
support tomcat, so another good reason.

Its amazing how much I have learned from your emails. I really mean it.
Appreciate your help man.

As for ports, it makes sense now. As for googling, I think i purely
searched for java debug tomcat. I missed the tomcat exe version xdebug one.
:-)

here are the args now which work fine with a line break after -Xdebug

-Xdebug

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

-Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 7.0

-Dcatalina.base=C:\Program Files\Apache Software Foundation\Tomcat 7.0

-Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Tomcat
7.0\endorsed

-Djava.io.tmpdir=C:\Program Files\Apache Software Foundation\Tomcat 7.0\temp

-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=C:\Program Files\Apache Software
Foundation\Tomcat 7.0\conf\logging.properties

<Ajas Mohammed />
http://ajashadi.blogspot.com
We cannot become what we need to be, remaining what we are.
No matter what, find a way. Because thats what winners do.
You can't improve what you don't measure.
Quality is never an accident; it is always the result of high intention,
sincere effort, intelligent direction and skillful execution; it represents
the wise choice of many alternatives.


On Thu, Nov 24, 2011 at 11:57 AM, Charlie Arehart <char...@carehart.org>wrote:

> Ajas, here are some thoughts that may help:
>
> The changing port
> ----------------------
>
> As for the port “changing all the time”, that is normal behavior. Adobe
> chose to implement things such that the “public” port for the debugger does
> change, while the “private” port (specified in the admin, or on that config
> line) is fixed. The “connection  the dots” is handled by both client
> (Adobe’s Eclipse-based debugger, knowing to look for such a randomly
> changing port) and the server (with CF and RDS handling the transmission of
> debug info between this public and private port).
>
> Of course, a problem with this approach is that if the CF server you want
> to talk to is within a firewall (and your Eclipse client is not), then
> you’re going to need to open a firewall hole—and if it’s changing all the
> time, that is a real problem. The good news is that Adobe has provided for
> that, with an additional optional java arg:
> -DDEBUGGER_SERVER_PORT=portNumber. I discuss this (and point to other
> resources discussing it further) in a blog entry:
>
> CF911: Want to modify the CF Step Debugger's use of a random port?****
>
>
> http://www.carehart.org/blog/client/index.cfm/2010/10/29/cf_debugger_using_random_port
> ****
>
>
> Configuring the port in Tomcat (specifically tomcat7w)
> ----------------------------------------------------------------****
>
> ** **
>
> As for where and how to configure the setting, it can vary. For instance,
> you show using tomcat7w, the tool for modifying Tomcat config when running
> it as a Windows service. Others may be starting CF from the command line,
> such as with catalina.bat or catalina.sh.
>
> With the latter command-line tools (as with the typical CF-based
> jvm.config), these java args could be specified all on one line, in
> CATALINA_OPTS. Then again, some resources also show doing it as a series of
> SET commands in the startup script files, with one argument per set line.
>
> But you mention using tomcat7w (or one might be using tomcat6w or 5w), and
> that’s different still: as you’ve noted, it presents an interface into
> which you can drop any args—but you refer to putting them on the “first
> line” or “last line”.
>
> Here’s the solution to this problem: with that interface, it turns out you
> need to put EACH arg on its OWN line. :-).****
>
>
> Finding resources
> ----------------------
>
> It can be frustrating, of course, to know what to do, with so many
> variations. And you’ll certainly be challenged trying to find info respect
> to configuring Tomcat and CF specifically (and especially things related to
> it, like its debugger). Consider that the percentage of people deploying CF
> on Tomcat (for now) is relatively small, and the number of those who would
> also use CF’s debugger would be still smaller—when you finally consider how
> many of who would blog their experience, you’re down to a pretty small
> number. :-)
>
> So you have to be creative in how you look for answers. In this case, it
> would be best to look for info on how to configure java debugging in tomcat
> using tomcat7w. For instance, I hadn’t yet used it, but I did a search for:
>
> Tomcat7w "Xdebug"
>
> And the first result (for me) was this page, which clarified the need for
> the settings to be in separate lines:
>
>
> http://harikrish.wordpress.com/2011/06/02/steps-to-start-tomcat-windows-service-in-debug-mode/
>
> That was fortunate, as there were only 11 results at all! The shame is
> that the Tomcat folks chose to put the version number in the toolname. If
> you were to look for that with “tomcat6w” instead, there are 600+ results!
> :-), and another lamenting the surprise at having to put it on separate
> lines (http://www.jroller.com/rezaghp/entry/remote_debug_tomcat_6).
>
> Finally, for those who may wonder, if one was using CF Standard or CF
> Enterprise in Server mode, then CF would take care of modifying its
> underlying jvm.config for you, when you changed the CF Admin to turn on
> debugging. But when using a J2EE deployment (or even the multiserver form
> of CF deployment) you have to edit the file yourself, as you’re attempting.
> Again, I discuss that sort of stuff (though not this tomcat stuff) in my
> chapter on the debugger.
>
> HTH, and Happy Thanksgiving to all. Off for some turkey now! :-)
>
> /charlie****
>
> ** **
>
> *From:* ad...@acfug.org [mailto:ad...@acfug.org] *On Behalf Of *Ajas
> Mohammed
> *Sent:* Thursday, November 24, 2011 2:21 AM
> *To:* discussion@acfug.org
> *Subject:* [ACFUG Discuss] Tomcat 7 Windows service + cfusion deployed -
> debug not working****
>
> ** **
>
> So I setup a Tomcat , CFusion environment just for test as I had not
> worked with Tomcat before. (one of the reasons is CF X will be tomcat based
> :-) )****
>
> ** **
>
> Everything is working fine except the CFEclipse/CFBuilder debugger. The
> RDS connection works fine. For Debug, in CF Administrator, I have set port
> number as 5005, but whenever I try to test debugger connection in Eclipse,
> I get message that debugger is running on 51309 (port keeps changing all
> the time).****
>
> ** **
>
> See attached snapshots.****
>
> ** **
>
>  I changed java options under java tab for configure tomcat
> i.e. C:\Program Files\Apache Software Foundation\Tomcat
> 7.0\bin\tomcat7w.exe, and I added this as first line -Xdebug
> -Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=n but it
> didnt work. Then I added it as the last line but still didnt work. By the
> way, I tried to stop restart Tomcat after every change. Full options below :
> ****
>
> ** **
>
> -Xdebug -Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=n****
>
> -Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 7.0****
>
> -Dcatalina.base=C:\Program Files\Apache Software Foundation\Tomcat 7.0****
>
> -Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Tomcat
> 7.0\endorsed****
>
> -Djava.io.tmpdir=C:\Program Files\Apache Software Foundation\Tomcat
> 7.0\temp****
>
> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager****
>
> -Djava.util.logging.config.file=C:\Program Files\Apache Software
> Foundation\Tomcat 7.0\conf\logging.properties****
>
> ** **
>
> Does anybody have any experience in this setup or any ideas or have tried
> debugger in tomcat cfusion webapp?****
>
> ** **
>
> Thanks,****
>
> ** **
>
> <Ajas Mohammed />
> http://ajashadi.blogspot.com
> We cannot become what we need to be, remaining what we are.
> No matter what, find a way. Because thats what winners do.
> You can't improve what you don't measure.
> Quality is never an accident; it is always the result of high intention,
> sincere effort, intelligent direction and skillful execution; it represents
> the wise choice of many alternatives.****
>
> -------------------------------------------------------------
> To unsubscribe from this list, manage your profile @
> http://www.acfug.org?fa=login.edituserform
>
> For more info, see http://www.acfug.org/mailinglists
> Archive @ http://www.mail-archive.com/discussion%40acfug.org/
> List hosted by FusionLink <http://www.fusionlink.com>
> -------------------------------------------------------------

Reply via email to