Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exceptions when executing IntelliJ with the AppMap agent attached #205

Open
jansorg opened this issue Aug 28, 2023 · 6 comments
Open

Exceptions when executing IntelliJ with the AppMap agent attached #205

jansorg opened this issue Aug 28, 2023 · 6 comments

Comments

@jansorg
Copy link

jansorg commented Aug 28, 2023

I attempted to launch IntelliJ with the agent attached to it.

Custom VM options (Help > Edit Custom VM Options):

-javaagent:/home/jansorg/.appmap/lib/java/appmap.jar
-Dappmap.config.file=/home/jansorg/self-employment/customers/AppLand/intellij-plugin/appmap.yml
-Dappmap.output.directory=/home/jansorg/self-employment/customers/AppLand/intellij-plugin/appmap-intellij/
-Dappmap.debug=false
-Dappmap.recording.auto=true

This prints a lot of debug info, errors and exceptions to STDOUT. Help > Show log in ... displays the log with STDOUT embedded.

Log:
appmap-agent.log.txt

IntelliJ info:

IntelliJ IDEA 2021.3.3 (Ultimate Edition)
Build #IU-213.7172.25, built on March 15, 2022
Runtime version: 11.0.14.1+1-b1751.46 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 6.4.12-arch1-1
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 32
Registry:
    ide.allow.merge.buttons=false
    ide.slow.operations.assertion=false
    ide.images.show.chessboard=true

Non-Bundled Plugins:
    org.jetbrains.kotlin (213-1.8.10-release-430-IJ6777.52)
    org.jetbrains.idea.grammar (2021.1.2)
    com.github.copilot (1.2.9.2684)
    YourKit Java Profiler 2021.3-b231 Integration (2021.3.231.0)
    com.intellij.spring.webflow (213.6461.21)
    pro.bashsupport (3.3.0.213)
    appland.appmap (0.45.5)
    io.karatelabs.intellij (1.7.7.361-211)

Kotlin: 213-1.8.10-release-430-IJ6777.52
Current Desktop: KDE
@kgilpin
Copy link
Contributor

kgilpin commented Aug 28, 2023

@apotterri are any of these exceptions concerning?

@apotterri
Copy link
Collaborator

I don't think so, but it's a little hard to tell.

@jansorg Can you rerun this without -Dappmap.debug set please? The agent actually doesn't pay attention to the value of the property, it only checks to see if it's set. So, -Dappmap.debug=false is the same as -Dappmap.debug=true, is the same as -Dappmap.debug. ;)

Independently of appmap.debug, you can set appmap.debug.file to the path for a log file, if that's helpful. If you don't set that, log messages get written to stderr.

If there are still exceptions shown without appmap.debug set, those would be of concern.

@jansorg
Copy link
Author

jansorg commented Aug 28, 2023

@apotterri Thanks! Without the log option, there are no exceptions in the log. But the created AppMap remains empty, even though I used code of the AppMap plugin.
Even with com and org as packages it remains empty:

name: intellij-appmap
packages:
    - path: appland
    - path: com
    - path: org
appmap_dir: appmap-intellij

Is there a way to let it record all method calls, regardless of the package?

@apotterri
Copy link
Collaborator

Sorry, you didn't say that your AppMaps were empty. ;)

No, there's no way to make the agent record all calls from any package, though putting the paths com and org in appmap.yml will probably come pretty close. It's almost certain to yield huge AppMaps, so it's probably inadvisable.

So, I guess those exceptions in the original log may indicate a problem after all. I'll need to investigate this myself to figure out why it's failing.

@apotterri
Copy link
Collaborator

@jansorg I think this should be fixed now. Can you try it again?

@jansorg
Copy link
Author

jansorg commented Nov 6, 2023

@apotterri I tried again. I only got an empty appmap. I've attached the debug log.

Local changes to build.gradle.kts to launch runIde with the agent attached:

            jvmArgs("-javaagent:/home/jansorg/.appmap/lib/java/appmap.jar")
            systemProperty("appmap.config.file", rootDir.resolve("appmap.yml").absolutePath)
            systemProperty("appmap.debug", "true")
            systemProperty("appmap.debug.file", rootDir.resolve("appmap-debug.txt").absolutePath)
            systemProperty("appmap.output.directory", rootDir.resolve("tmp/appmap/runIde").absolutePath)
            systemProperty("appmap.recording.auto", "true")

appmap-debug.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants