does anybody know a way to let gradle run the application in debug mode but not wait until the debugger attachs? I know this is a nice feature to have the debugger attached when the application starts. My google research was not fruitful.
The command I execute to start the application in debug mode.
./gradlew appRunDebug
(which is equivalent to ./gradlew appRun --debug-jvm)
What I see then on the console after several seconds:
Listening for transport dt_socket at address: 5005
<============-> 97% EXECUTING [1m 2s]
At this point I have to attach my debugger to the process in order that the start routine continues. But I just want to have the debug port open and the application fully running without attaching my debugger.
How can this be achived? Thanks for any help. Even the confirmation that this is not possible.
According to https://akhikhl.github.io/gretty-doc/Debugger-support.html, from Gradle 1.1.8 onwards, you should be able to set the debugSuspend property to false and appRunDebug won't start the application in suspended mode.
Related
I'm running on AEM Perspective with my remote server running. I then run Java Remote Application configuration on port 5402. First time running the debug config, it says it failed. Second time running it it says "Failed to connect to VM. Connection refused."
None of the breakpoints I've set up get hit, or are the icon they're meant to be when debug is running. None of the buttons on the debug view are lit up indicatin debug is actually working. However, eclipse is active as a task for the debug port when I run netstat -ano | findstr :5402 on cmd line.
I have restarted eclipse and AEM about 10 times today trying to get around this as no one on my team is experiencing this issue. I'm new to the tea, though, and all of them have had their environments running for years, so they don't know what step I could be missing that I can't get my env to work like theirs.
This is preventing me from getting work done and is very frustrating. Does anyone know why Eclipse would behave this way?
Please correct me if I did anything wrong:
I created a web service (WSDL) in Java and it has a method TestCall().
I also created a website http://testwebsite:8000/abc/index.html, and this website is calling the web service in step 1.
I created a remote debugging for it in IntelliJ. I put testwebsite as the host and 8000 as the port number.
Once I went to http://testwebsite:8000/abc/index.html and click on TestCall(), it didn't go to the breakpoint in IntelliJ. When I was trying to remote debug the web service, I got error:
Unable to open debugger port (testwesite:8000), handshake failed, connection permanently closed.
Can someone tell me what steps I missed? thanks
When you need to remotely debug an application, go to the settings (Run->Edit configurations) in IntelliJ.
Now click the + sign and add a Remote configuration. It tells you the command line to add to the startup of the JVM you start on the remote machine. It will be something like:
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 for jvm 5-8.
Now you can start your remote web service on the server with these extra command line options. Then you start this configuration in IntelliJ. It will tell you Connected to target VM, address: 'server name', transport: 'socket'. You can add breakpoints as you are used to with local debugging.
As you see: the remote debugging does not use the web-port, but a different port that is opened especially for debugging purposes. If there are firewalls between the server and your workstation, please choose a port that is open, or have the firewall port opened (if possible).
I have Android app which are writed use Java and C++/JNI code. My C++/JNI part work bad. I want to debug native code.
I work in Android Studio.
I did all step which take official site
enter link description here
But when I start debug I see line
Starting LLDB server
And he does not finish. I wait 30 min but he does not finish.
What I must to do. Because I think this bug or I must to take some settings.
I found error. But I did not understand. When I test app from USB cable all work good. But when I want to test my app through wifi (I use Android Wifi ADB) LLDB Debug server start, but not attach to process.
If I debug java code use java debugger all work good.
All output in debug console:
Connecting to org.temp.test
Waiting for application to start debug server
Waiting for application to come online: org.temp.test.test | org.temp.test
Connecting to org.temp.test
Now Launching Native Debug Session
Starting LLDB server: /data/data/org.temp.test/lldb/bin/start_lldb_server.sh /data/data/org.temp.test/lldb unix-abstract /data/data/org.temp.test/lldb/tmp platform-1524470360668.sock "lldb process:gdb-remote packets"
I am running my Scala(tra v.2.3.0) application using ./sbt -jvm-debug 8000 - and get the proper "Listening for transport dt_socket at address: 8000" - followed by container:start. And the container starts, and the app seems to work properly. The JVM used has been set with jenv local oracle64-1.8.0.77.
Now when I go to Eclipse and run my Debug configuration, that is
Connection type: Scala debugger (Socket attach)
Connection localhost, port 8000
Preferred launcher: Scala Remote Launcher
In Scala Debugger tab, "Enable async trace functionality" is ticked
the debugger looks like it is attached, as I get this screen.
However no breakpoint stops, my Variables window is empty, and it looks like a "ghost app".
Any idea about what I could be doing wrong? I seem to have exhausted the usual suspects (but hey, maybe I missed one).
I want to add a new extension and for that I need to stop hybris server first, but I am unable to figure out how exactly I should STOP the server: through command line or by admin Console?
I cannot type any command as my server is running.
I also started the server by using hybrisserver.bat
just push ctrl + c in the command line window and the server is shut down properly
As a small side note, if you'd like to stop a hybris server through the admin console, you could always go to Console > Scripting Languages > Edit Statement and execute System.exit(0);
hybris has got all the necessary runtime shutdown hooks to do a graceful (as if you did CTRL + C).
In theory it's also possible to restart the hybris system internally by executing:
import de.hybris.platform.core.Registry;
Registry.destroyAndForceStartup();
By default, there's a restriction to forbid doing so using groovy scripts, though.
Sometimes it happen that the hybrisserver is runned on another console and even after hybrisserrver.sh stop some processes are still running. And you will receive message like:
INFO: Illegal access: this web application instance has been stopped already
My solution is (for linux based systems):
lsof | grep hybris
To get the processes runned from "hybris" directory(change on you need) and then kill the listed processes with:
kill -15 <PROCESS_ID>
PS. (This solution require the root privileges)
Use this command /bin/platform/hybrisserver.sh stop
That will stop the server.