How to debug webapps running in tomcat on Mac snowleopard with idea 9
Dear Idea users,
I am currently in the process of defecting from PC to Mac. I have managed to get everything working on the mac as it does on the PC. i.e. tomcat, mysql etc. Idea also runs fine with the project on the mac, in that it can start and stop tomcat.
The only problem I have is that I just can't get it to debug! It seems to start up tomcat, and says its listening on port 8000 etc. but it never stops at any breakpoints.
The exact same project running on windows, will debug perfectly. But running on mac I get no joy.
Has anyone else experienced this issue or does anyone have an inkling of what schoolboy kind of error I might be doing?
I am runing tomcat with the following options:
-Dcatalina.base=/opt/apache-tomcat-6.0.26 -Dcatalina.home=/opt/apache-tomcat-6.0.26 -Xmx500m
So that it picks up settings from my tomcat conf files. I don't know if this could be related to the issue?
One further thing I have noticed is that although my idea tomcat configuration says that it is going to startup tomcat running in debug mode, I can't see any of these options set when i do a ps and grep for tomcat...
tomthurston 25647 0.0 16.0 3785420 669652 ?? S 10:40am 0:29.02 /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/java -Djava.util.logging.config.file=/Users/tomthurston/Library/Caches/IntelliJIdea90/tomcat/Enterprise_-_Skillpillz_imf-enterprise4c7c8d4/conf/logging.properties -server -Xms1g -Xmx1g -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/apache-tomcat-6.0.26/endorsed -classpath /opt/apache-tomcat-6.0.26/bin/bootstrap.jar -Dcatalina.base=/Users/tomthurston/Library/Caches/IntelliJIdea90/tomcat/Enterprise_-_Skillpillz_imf-enterprise4c7c8d4 -Dcatalina.home=/opt/apache-tomcat-6.0.26 -Djava.io.tmpdir=/opt/apache-tomcat-6.0.26/temp org.apache.catalina.startup.Bootstrap start
On reflection, it looks like this is probably the problem... therefore the question maybe should be - why does idea say that it is going to set these values but doesn't - and does anyone know how to get around this problem?
With kind regards,
Tom
请先登录再写评论。
Which type of run configuration you're using to start the Tomcat? Could you please attach iws file of your project (or .idea/workspace.xml file if
you're using the directory based project layout).
>
>
>
>
>
>
>
>
>
>
>
>
>
--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Hi Nikolay,
Many thanks for getting back to me on this. I have attatched the iws file.
I am just using a tomcat run configuration created by adding a local tomcat run config from the config menu.
It has worked for me this way for years on PC so apologies if I've done somethign stupid!
With kind regards,
Tom
Attachment(s):
imf-enterprise.iws.zip
OK I've solved this...
When trying to get my webapp to run on the mac for the first time I set the java opts in catalina.sh...
This presumably overwrites the settigns which idea tries to set on the tomcat...
Thanks for your help Nikolay - I only noticed that the options from idea were not being set at all when i realised that i was setting them to 500 meg in idea but 1gig in my tomcat script!
With kind regards,
Tom