Giter Site home page Giter Site logo

attachme's People

Contributors

jastice avatar samvel1024 avatar uriariel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

attachme's Issues

Add an option for AttachMe to be quiet on stdout/stderr

I'm debugging JVM processes that get called by other programs and whose stdout/stderr get examined. AttachMe messages to stdout/stderr break the calling process by introducing unexpected output.

It would be nice to add an additional agent option (maybe quiet=[y/n]) to avoid printing anything, at least for anything that is not a fatal error. That would make it possible to debug JVM cli apps that get called from scripts, etc.

Can't debug Gradle process

I'd love to be able to use this plugin to debug Gradle plugins and processes spawned by Gradle.

Unfortunately, after running source ~/.attachme/conf.sh all Gradle tasks fail with the output:

* What went wrong:
Unable to determine version for JDK located at /Library/Java/JavaVirtualMachines/adoptopenjdk-15.jdk/Contents/Home. Reason: Unexpected command output: 
Listening for transport dt_socket at address: 53880
/Library/Java/JavaVirtualMachines/adoptopenjdk-15.jdk/Contents/Home
15.0.2
AdoptOpenJDK
x86_64
OpenJDK 64-Bit Server VM
15.0.2+7
OpenJDK Runtime Environment
15.0.2+7

The issue is that Gradle is probing the JVM to determine its version and isn't expecting the "Listening for transport dt_socket at address: 53880" line in the output.

The workaround is to edit ~/.attachme/conf.sh to switch jdwp to 'quiet' mode:

JDWP_ARGS="${JDWP_ARGS:=transport=dt_socket,server=y,suspend=y,quiet=y,address=${JDWP_ADDR}:${JDWP_PORT}}"

Would be nice if the workaround was not needed.

Self contained build

The build has to include generation of agent jar and including that in plugin resources.

Getting java.lang.ClassCastException while trying to attach IntelliJ debugger

I followed the instructions to setup the AttachMe using port address 127.0.0.1, because of the a problem with the bind address. Then I ran the Play application using sbt start. The AttachMe throws an exception:

AttachMe listening for debuggee processes on port 7857
java.lang.ClassCastException: class com.intellij.debugger.impl.attach.JavaAttachDebuggerProvider$ProcessAttachRunConfiguration cannot be cast to class com.attachme.plugin.AttachmeDebugger$ProcessAttachRunConfiguration (com.intellij.debugger.impl.attach.JavaAttachDebuggerProvider$ProcessAttachRunConfiguration is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @44774fa2; com.attachme.plugin.AttachmeDebugger$ProcessAttachRunConfiguration is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @1412d19c)
	at com.attachme.plugin.AttachmeDebugger.attach(AttachmeDebugger.java:27)
	at com.attachme.plugin.AttachmeRunner.onDebuggeeProcess(AttachmeRunner.java:59)
	at com.attachme.plugin.AttachmeRunTask.runServer(AttachmeRunTask.java:67)
	at com.attachme.plugin.AttachmeRunTask.run(AttachmeRunTask.java:39)
	at java.base/java.lang.Thread.run(Thread.java:834)

What does cause to the exception? How to fix it?
Thank you!

Docker support

Implement a docker support for automatically attaching to JVMs inside docker containers.

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.