is that the IDE doesn't support it yet.

NetBeans most certainly supports debugging a running Tomcat started with the "jpda" option 
through the "Debug -> Attach" menu

I am doing this on a regular basis with applications that can't be deployed 
through NetBeans (e.g. Liferay portlets).

If you can't start Tomcat from within NetBeans, then start it on the command 
line (after deploying your WAR file manually)

In my experience you need to use the "catalina" script, because "startup" 
script does not seem to pass the parameters correctly.

When using

    catalina.bat jpdba run

You will see something like this:

    Using CATALINA_BASE:   "d:\etc\apache-tomcat-9.0.73"
    Using CATALINA_HOME:   "d:\etc\apache-tomcat-9.0.73"
    Using CATALINA_TMPDIR: "d:\etc\apache-tomcat-9.0.73\temp"
    Using JRE_HOME:        "c:\etc\Java11"
    Using CLASSPATH:       
"d:\etc\apache-tomcat-9.0.73\bin\bootstrap.jar;d:\etc\apache-tomcat-9.0.73\bin\tomcat-juli.jar"
    Using CATALINA_OPTS:   ""
    NOTE: Picked up JDK_JAVA_OPTIONS:  
--add-opens=java.base/java.lang=ALL-UNNAMED 
--add-opens=java.base/java.io=ALL-UNNAMED 
--add-opens=java.base/java.util=ALL-UNNAMED 
--add-opens=java.base/java.util.concurrent=ALL-UNNAMED 
--add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
    Listening for transport dt_socket at address: 8000
    25-Mar-2023 08:55:20.303 INFORMATION [main] 
org.apache.catalina.startup.VersionLoggerListener.log Server Version:        
Apache Tomcat/9.0.73

The important bit is: the "Listening for transport dt_socket at address: 8000"

If that shows up, you can use "Debug -> Attach" from within NetBeans to debug 
your application inside Tomcat.

Thomas

Tim de Vries schrieb am 25.03.2023 um 02:10:
Probably, the problem with this...., and maybe lombok, is that the IDE doesn't 
support it yet.


It depends on who's doing what and how.


Everything I make, works, mostly, ... , I continually make changes and test.

Tim

On 23/03/2023 11:39 p.m., Thomas Kellerer wrote:
Greenberg, Gary schrieb am 13.03.2023 um 18:03:
Last year I have developed a Spring-Boot web application.
It was originally developed as a JAR but later converted to a WAR and deployed 
to the Tomcat 9 on a production server.

Last week, a bug was found and I need to fix it.

Not to change the configuration, I have installed Tomcat 9 on my Windows laptop 
and was trying to debug the application on it.

When I click on “Debug” in my Netbeans 16, it builds the war but than trying to 
stop Tomcat for a while and then fails to do it.

I did stop Tomcat manually and tried to do it again, but than Netbeans failed 
to start Tomcat.

Looks like there are some permission issues. Can someone tells me how to fix it.
I remember, long ago, with Netbeans 8.2 and Tomcat6 I haven’t had a problems 
deploying apps without start/stop.
A workaround might be to start Tomcat manually in debug mode (using "catalina jpda 
run")

Then use "Debug -> Attach" to attach to the running Tomcat instance.

Thomas

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to