Giter Site home page Giter Site logo

Comments (6)

anderslars avatar anderslars commented on June 4, 2024

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.

softwareCobbler avatar softwareCobbler commented on June 4, 2024

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.

ASKemp avatar ASKemp commented on June 4, 2024

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.

ASKemp avatar ASKemp commented on June 4, 2024

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.

zspitzer avatar zspitzer commented on June 4, 2024

If it stops, there must be error logs in the tomcat log directory?

from luceedebug.

carehart avatar carehart commented on June 4, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.