Comments (6)
FWIW I'm running Windows with Tomcat (commandbox) and am using this in my server.json
"jvm":{
"args":[
"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=127.0.0.1:9999",
"-javaagent:c:\xxxxxx\luceedebug.jar=jdwpHost=127.0.0.1,jdwpPort=9999,debugHost=localhost,debugPort=10000,jarPath=c:\xxxxxx\luceedebug.jar"
],
"javaVersion":"openjdk11_jdk"
}
from luceedebug.
for windows, it ought to be the path to tomcat's bin, and then a file named setenv.bat
REM this file is c:\foo\bar\whatever\tomcat\bin\setenv.bat
set LDJAR=c:\Users\path\to\luceedebug.jar
set CATALINA_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=localhost:9999 -javaagent:%LDJAR%=jdwpHost=localhost,jdwpPort=9999,cfHost=0.0.0.0,cfPort=10000,jarPath=%LDJAR%
from luceedebug.
for windows, it ought to be the path to tomcat's bin, and then a file named
setenv.bat
REM this file is c:\foo\bar\whatever\tomcat\bin\setenv.bat set LDJAR=c:\Users\path\to\luceedebug.jar set CATALINA_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=localhost:9999 -javaagent:%LDJAR%=jdwpHost=localhost,jdwpPort=9999,cfHost=0.0.0.0,cfPort=10000,jarPath=%LDJAR%
I think if you run Tomcat as a Windows service then the setenv.bat file is ignored.
from luceedebug.
Still unable to get this to work. We run a number of Lucee instances under Tomcat as a service on Windows.
Tried settings in setenv.bat, catalina.bat, startup.bat, adding to the Java options of the individual instance service control - all without luck,
The instance service control panel seems the best option so far.
My existing options are:-
-Dcatalina.home=c:\lucee\tomcat
-Dcatalina.base=c:\lucee\tomcat\instances{myInstance}
-Dignore.endorsed.dirs=c:\lucee\tomcat\endorsed
-Djava.io.tmpdir=c:\lucee\tomcat\instances{myInstance}\temp
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=c:\lucee\tomcat\instances{myInstance}\conf\logging.properties
Adding to the end...
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=localhost:7999
Allows the service to startup and I see port 7999 (trying to use 7999 and 8000 since 9999 is already in use) spring into life using CurrPorts tool as attached to a tomcat9.exe process.
If I then add the second part as...
-javaagent:C:\luceedebug\luceedebug\build\libs\luceedebug.jar=jdwpHost=localhost,jdwpPort=7999,cfHost=0.0.0.0,cfPort=8000,jarPath=C:\luceedebug\luceedebug\build\libs\luceedebug.jar
...then the service starts but then stops, so must be something with the format or values of this part. Tried 0.0.0.0, localhost and 127.0.0.1 for cfHost values, same result.
from luceedebug.
If it stops, there must be error logs in the tomcat log directory?
from luceedebug.
@ASKemp Try changing the path separators in the javaagent arg (both paths, and all the slashes) from \ to either / or \, which is often called for when using Java on Windows.
I'm just offering this as a suggestion, not saying I've confirmed it (as I'm on a phone as I read this). Can you confirm trying it, even if somehow it "doesn't work"? Thx.
from luceedebug.
Related Issues (20)
- Troubleshooting "unverified breakpoint" HOT 6
- Deal with Large Class Files HOT 2
- Proper settings and Unverified Breakpoint HOT 18
- Logging & Shaded Jar HOT 2
- NoClassDefException on Lucee 6 HOT 1
- Connection Refused on port 9999 on Lucee 5.4.0.23 HOT 3
- Debugger failed to attach: handshake failed HOT 7
- Usage with CommandBox HOT 4
- NoClassDefFoundError: com/sun/jdi/Bootstrap HOT 2
- java.lang.OutOfMemoryError: Java heap space after loading numerous pages HOT 8
- Performance Overhead HOT 19
- gradlew.bat shadowjar HOT 2
- Exception while attempting classfile rewrite HOT 4
- java.lang.IllegalArgumentException: character to be escaped is missing - when running latest build HOT 2
- java.lang.NullPointerException on Lucee Restart HOT 4
- Version/Tag the Agent HOT 1
- Lucee 5.4.1.8 Issue: java.lang.NoClassDefFoundError: com/sun/jdi/Bootstrap HOT 3
- Vulnerabilities in Guava Dependency HOT 3
- How to Run Tests? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from luceedebug.