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

Unable to see the highlight in the editor section for the Java debugging #14576

Closed
ghost opened this issue Sep 17, 2019 · 28 comments
Closed

Unable to see the highlight in the editor section for the Java debugging #14576

ghost opened this issue Sep 17, 2019 · 28 comments
Labels
area/editor/theia Issues related to the che-theia IDE of Che lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. status/analyzing An issue has been proposed and it is currently being analyzed for effort and implementation approach

Comments

@ghost
Copy link

ghost commented Sep 17, 2019

Running che 7.1.0 with che-java11-maven, set few breakpoints and start debugging. Unable to see the highlight on the line where the breakpoint is set (shown in the attached image). Any suggestion?

Screen Shot 2019-09-17 at 11 34 49 AM

@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Sep 17, 2019
@ghost ghost changed the title Unable to get the highlight on the editor section in the Java debugging Unable to see the highlight in the editor section for the Java debugging Sep 17, 2019
@l0rd
Copy link
Contributor

l0rd commented Sep 17, 2019

@rbcminghou I am not able to reproduce it. What browser are you using?

image

@l0rd l0rd added status/info-needed More information is needed before the issue can move into the “analyzing” state for engineering. and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Sep 17, 2019
@ghost
Copy link
Author

ghost commented Sep 17, 2019

Chrome

@l0rd
Copy link
Contributor

l0rd commented Sep 17, 2019

@rbcminghou I have no clue why this is happening. @tsmaeder @tolusha ?

@l0rd l0rd added status/analyzing An issue has been proposed and it is currently being analyzed for effort and implementation approach and removed status/info-needed More information is needed before the issue can move into the “analyzing” state for engineering. labels Sep 17, 2019
@ghost
Copy link
Author

ghost commented Sep 17, 2019

Attached the images for my plugins and editors:

Screen Shot 2019-09-17 at 4 07 50 PM

Screen Shot 2019-09-17 at 4 07 59 PM

I am running Java 11 with the following container images:
eclipse/che-java11-maven:7.1.0
eclipse/che-machine-exec:7.1.0
eclipse/che-theia:7.1.0
eclipse/che-remote-plugin-runner-java11:next

Is there something I can look up my log?

@tolusha
Copy link
Contributor

tolusha commented Sep 18, 2019

@rbcminghou
Could you provide a github link to your app?

Is there something I can look up my log?

Preferences -> Debug -> trace (set to true).
Then open output view for Debug Adapters to check detailed logs

@ghost
Copy link
Author

ghost commented Sep 18, 2019

@tolusha, sorry I do not have the github link for my app.

Just copied and pasted all logs from "Debug Adapters":

77b33414 theia -> adapter: {"seq":1,"type":"request","command":"initialize","arguments":{"clientID":"Theia","clientName":"Theia IDE","adapterID":"java","locale":"en-US","linesStartAt1":true,"columnsStartAt1":true,"pathFormat":"path","supportsVariableType":false,"supportsVariablePaging":false,"supportsRunInTerminalRequest":true}}
77b33414 theia <- adapter: {"success":true,"request_seq":1,"command":"initialize","body":{"supportsConfigurationDoneRequest":true,"supportsHitConditionalBreakpoints":true,"supportsConditionalBreakpoints":true,"supportsEvaluateForHovers":true,"supportsCompletionsRequest":true,"supportsRestartFrame":true,"supportsSetVariable":true,"supportsRestartRequest":false,"supportTerminateDebuggee":true,"supportsDelayedStackTraceLoading":false,"supportsLogPoints":true,"supportsExceptionInfoRequest":true,"exceptionBreakpointFilters":[{"label":"Uncaught Exceptions","filter":"uncaught"},{"label":"Caught Exceptions","filter":"caught"}]},"seq":1,"type":"response"}
77b33414 theia -> adapter: {"seq":2,"type":"request","command":"attach","arguments":{"type":"java","name":"Debug (Attach)","request":"attach","hostName":"localhost","port":8000,"debugServer":34655}}
77b33414 theia <- adapter: {"event":"output","body":{"category":"console","output":"[Warn] The debugger and the debuggee are running in different versions of JVMs. You could see wrong source mapping results.\nDebugger JVM version: 11.0.4\nDebuggee JVM version: 11.0.3","variablesReference":0,"line":0,"column":0,"type":"output"},"seq":2,"type":"event"}
77b33414 theia <- adapter: {"event":"initialized","body":{"type":"initialized"},"seq":3,"type":"event"}
77b33414 theia <- adapter: {"success":true,"request_seq":2,"command":"attach","seq":4,"type":"response"}
77b33414 theia -> adapter: {"seq":3,"type":"request","command":"configurationDone","arguments":{}}
77b33414 theia <- adapter: {"success":true,"request_seq":3,"command":"configurationDone","seq":5,"type":"response"}
77b33414 theia -> adapter: {"seq":4,"type":"request","command":"threads","arguments":{}}
77b33414 theia <- adapter: {"event":"thread","body":{"reason":"started","threadId":1,"type":"thread"},"seq":6,"type":"event"}
77b33414 theia <- adapter: {"event":"thread","body":{"reason":"started","threadId":5,"type":"thread"},"seq":7,"type":"event"}
77b33414 theia <- adapter: {"success":true,"request_seq":4,"command":"threads","body":{"threads":[{"id":1,"name":"Thread [main]"},{"id":2,"name":"Thread [Reference Handler]"},{"id":3,"name":"Thread [Finalizer]"},{"id":4,"name":"Thread [Signal Dispatcher]"},{"id":5,"name":"Thread [Common-Cleaner]"}]},"seq":8,"type":"response"}
77b33414 theia <- adapter: {"event":"thread","body":{"reason":"exited","threadId":1,"type":"thread"},"seq":9,"type":"event"}
77b33414 theia <- adapter: {"event":"thread","body":{"reason":"started","threadId":6,"type":"thread"},"seq":10,"type":"event"}
77b33414 theia <- adapter: {"event":"thread","body":{"reason":"exited","threadId":6,"type":"thread"},"seq":11,"type":"event"}
77b33414 theia <- adapter: {"event":"exited","body":{"exitCode":0,"type":"exited"},"seq":12,"type":"event"}
77b33414 theia <- adapter: {"success":true,"request_seq":-1,"command":"terminate","seq":13,"type":"response"}
77b33414 theia <- adapter: {"success":false,"message":"java.lang.NullPointerException","request_seq":-1,"command":"disconnect","body":{"error":{"id":1000,"format":"java.lang.NullPointerException"}},"seq":14,"type":"response"}
77b33414 theia <- adapter: {"event":"terminated","body":{"restart":false,"type":"terminated"},"seq":15,"type":"event"}
77b33414 theia -> adapter: {"seq":5,"type":"request","command":"threads","arguments":{}}
77b33414 theia <- adapter: {"type":"event","event":"error","seq":-1,"body":{}}
77b33414 theia <- adapter: {"type":"event","event":"error","seq":-1,"body":{}}
9dfd4cc8 theia -> adapter: {"seq":1,"type":"request","command":"initialize","arguments":{"clientID":"Theia","clientName":"Theia IDE","adapterID":"java","locale":"en-US","linesStartAt1":true,"columnsStartAt1":true,"pathFormat":"path","supportsVariableType":false,"supportsVariablePaging":false,"supportsRunInTerminalRequest":true}}
9dfd4cc8 theia <- adapter: {"success":true,"request_seq":1,"command":"initialize","body":{"supportsConfigurationDoneRequest":true,"supportsHitConditionalBreakpoints":true,"supportsConditionalBreakpoints":true,"supportsEvaluateForHovers":true,"supportsCompletionsRequest":true,"supportsRestartFrame":true,"supportsSetVariable":true,"supportsRestartRequest":false,"supportTerminateDebuggee":true,"supportsDelayedStackTraceLoading":false,"supportsLogPoints":true,"supportsExceptionInfoRequest":true,"exceptionBreakpointFilters":[{"label":"Uncaught Exceptions","filter":"uncaught"},{"label":"Caught Exceptions","filter":"caught"}]},"seq":1,"type":"response"}
9dfd4cc8 theia -> adapter: {"seq":2,"type":"request","command":"attach","arguments":{"type":"java","name":"Debug (Attach)","request":"attach","hostName":"localhost","port":8000,"debugServer":34655}}
9dfd4cc8 theia <- adapter: {"success":false,"message":"Failed to attach to remote debuggee VM. Reason: java.net.ConnectException: Connection refused (Connection refused)","request_seq":2,"command":"attach","body":{"error":{"id":1003,"format":"Failed to attach to remote debuggee VM. Reason: java.net.ConnectException: Connection refused (Connection refused)"}},"seq":2,"type":"response"}
9dfd4cc8 theia <- adapter: {"success":false,"message":"Unrecognized request: { _request: terminate }","request_seq":-1,"command":"terminate","body":{"error":{"id":1001,"format":"Unrecognized request: { _request: terminate }"}},"seq":3,"type":"response"}
9dfd4cc8 theia <- adapter: {"success":true,"request_seq":-1,"command":"disconnect","seq":4,"type":"response"}
c8db0e79 theia -> adapter: {"seq":1,"type":"request","command":"initialize","arguments":{"clientID":"Theia","clientName":"Theia IDE","adapterID":"java","locale":"en-US","linesStartAt1":true,"columnsStartAt1":true,"pathFormat":"path","supportsVariableType":false,"supportsVariablePaging":false,"supportsRunInTerminalRequest":true}}
c8db0e79 theia <- adapter: {"success":true,"request_seq":1,"command":"initialize","body":{"supportsConfigurationDoneRequest":true,"supportsHitConditionalBreakpoints":true,"supportsConditionalBreakpoints":true,"supportsEvaluateForHovers":true,"supportsCompletionsRequest":true,"supportsRestartFrame":true,"supportsSetVariable":true,"supportsRestartRequest":false,"supportTerminateDebuggee":true,"supportsDelayedStackTraceLoading":false,"supportsLogPoints":true,"supportsExceptionInfoRequest":true,"exceptionBreakpointFilters":[{"label":"Uncaught Exceptions","filter":"uncaught"},{"label":"Caught Exceptions","filter":"caught"}]},"seq":1,"type":"response"}
c8db0e79 theia -> adapter: {"seq":2,"type":"request","command":"attach","arguments":{"type":"java","name":"Debug (Attach)","request":"attach","hostName":"localhost","port":8000,"debugServer":34655}}
c8db0e79 theia <- adapter: {"success":false,"message":"Failed to attach to remote debuggee VM. Reason: java.net.ConnectException: Connection refused (Connection refused)","request_seq":2,"command":"attach","body":{"error":{"id":1003,"format":"Failed to attach to remote debuggee VM. Reason: java.net.ConnectException: Connection refused (Connection refused)"}},"seq":2,"type":"response"}
c8db0e79 theia <- adapter: {"success":false,"message":"Unrecognized request: { _request: terminate }","request_seq":-1,"command":"terminate","body":{"error":{"id":1001,"format":"Unrecognized request: { _request: terminate }"}},"seq":3,"type":"response"}
c8db0e79 theia <- adapter: {"success":true,"request_seq":-1,"command":"disconnect","seq":4,"type":"response"}
8f078f26 theia -> adapter: {"seq":1,"type":"request","command":"initialize","arguments":{"clientID":"Theia","clientName":"Theia IDE","adapterID":"java","locale":"en-US","linesStartAt1":true,"columnsStartAt1":true,"pathFormat":"path","supportsVariableType":false,"supportsVariablePaging":false,"supportsRunInTerminalRequest":true}}
8f078f26 theia <- adapter: {"success":true,"request_seq":1,"command":"initialize","body":{"supportsConfigurationDoneRequest":true,"supportsHitConditionalBreakpoints":true,"supportsConditionalBreakpoints":true,"supportsEvaluateForHovers":true,"supportsCompletionsRequest":true,"supportsRestartFrame":true,"supportsSetVariable":true,"supportsRestartRequest":false,"supportTerminateDebuggee":true,"supportsDelayedStackTraceLoading":false,"supportsLogPoints":true,"supportsExceptionInfoRequest":true,"exceptionBreakpointFilters":[{"label":"Uncaught Exceptions","filter":"uncaught"},{"label":"Caught Exceptions","filter":"caught"}]},"seq":1,"type":"response"}
8f078f26 theia -> adapter: {"seq":2,"type":"request","command":"attach","arguments":{"type":"java","name":"Debug (Attach)","request":"attach","hostName":"localhost","port":8000,"debugServer":34655}}
8f078f26 theia <- adapter: {"event":"output","body":{"category":"console","output":"[Warn] The debugger and the debuggee are running in different versions of JVMs. You could see wrong source mapping results.\nDebugger JVM version: 11.0.4\nDebuggee JVM version: 11.0.3","variablesReference":0,"line":0,"column":0,"type":"output"},"seq":2,"type":"event"}
8f078f26 theia <- adapter: {"event":"initialized","body":{"type":"initialized"},"seq":3,"type":"event"}
8f078f26 theia <- adapter: {"success":true,"request_seq":2,"command":"attach","seq":4,"type":"response"}
8f078f26 theia -> adapter: {"seq":3,"type":"request","command":"setBreakpoints","arguments":{"source":{"name":"Helloworld.java","path":"/projects/java-maven-helloworld/src/main/java/com/rbccm/app/Helloworld.java"},"sourceModified":false,"breakpoints":[{"line":15,"column":1},{"line":27,"column":1},{"line":60,"column":1}]}}
c8db0e79 theia <- adapter: {"type":"event","event":"exited","seq":-1,"body":{"exitCode":1}}
9dfd4cc8 theia <- adapter: {"type":"event","event":"exited","seq":-1,"body":{"exitCode":1}}
8f078f26 theia <- adapter: {"success":true,"request_seq":3,"command":"setBreakpoints","body":{"breakpoints":[{"id":1,"verified":true,"line":15,"message":""},{"id":2,"verified":true,"line":27,"message":""},{"id":3,"verified":true,"line":60,"message":""}]},"seq":5,"type":"response"}
8f078f26 theia -> adapter: {"seq":4,"type":"request","command":"configurationDone","arguments":{}}
8f078f26 theia <- adapter: {"success":true,"request_seq":4,"command":"configurationDone","seq":6,"type":"response"}
8f078f26 theia -> adapter: {"seq":5,"type":"request","command":"threads","arguments":{}}
8f078f26 theia <- adapter: {"event":"thread","body":{"reason":"started","threadId":1,"type":"thread"},"seq":7,"type":"event"}
8f078f26 theia <- adapter: {"event":"thread","body":{"reason":"started","threadId":5,"type":"thread"},"seq":8,"type":"event"}
8f078f26 theia <- adapter: {"success":true,"request_seq":5,"command":"threads","body":{"threads":[{"id":1,"name":"Thread [main]"},{"id":2,"name":"Thread [Reference Handler]"},{"id":3,"name":"Thread [Finalizer]"},{"id":4,"name":"Thread [Signal Dispatcher]"},{"id":5,"name":"Thread [Common-Cleaner]"}]},"seq":9,"type":"response"}
8f078f26 theia <- adapter: {"event":"breakpoint","body":{"reason":"new","breakpoint":{"id":3,"verified":true,"line":60,"message":""},"type":"breakpoint"},"seq":10,"type":"event"}
8f078f26 theia <- adapter: {"event":"breakpoint","body":{"reason":"new","breakpoint":{"id":2,"verified":true,"line":27,"message":""},"type":"breakpoint"},"seq":11,"type":"event"}
8f078f26 theia <- adapter: {"event":"breakpoint","body":{"reason":"new","breakpoint":{"id":1,"verified":true,"line":15,"message":""},"type":"breakpoint"},"seq":12,"type":"event"}
8f078f26 theia <- adapter: {"event":"stopped","body":{"threadId":1,"reason":"breakpoint","allThreadsStopped":false,"type":"stopped"},"seq":13,"type":"event"}
8f078f26 theia -> adapter: {"seq":6,"type":"request","command":"threads","arguments":{}}
8f078f26 theia <- adapter: {"success":true,"request_seq":6,"command":"threads","body":{"threads":[{"id":1,"name":"Thread [main]"},{"id":2,"name":"Thread [Reference Handler]"},{"id":3,"name":"Thread [Finalizer]"},{"id":4,"name":"Thread [Signal Dispatcher]"},{"id":5,"name":"Thread [Common-Cleaner]"}]},"seq":14,"type":"response"}
8f078f26 theia -> adapter: {"seq":7,"type":"request","command":"stackTrace","arguments":{"startFrame":0,"levels":20,"threadId":1}}
8f078f26 theia -> adapter: {"seq":8,"type":"request","command":"threads","arguments":{}}
8f078f26 theia <- adapter: {"success":true,"request_seq":7,"command":"stackTrace","body":{"stackFrames":[{"id":1,"line":15,"column":1,"name":"Helloworld.\u003cinit\u003e()"},{"id":2,"line":44,"column":1,"name":"Helloworld.main(String[])"}],"totalFrames":2},"seq":15,"type":"response"}
8f078f26 theia <- adapter: {"success":true,"request_seq":8,"command":"threads","body":{"threads":[{"id":1,"name":"Thread [main]"},{"id":2,"name":"Thread [Reference Handler]"},{"id":3,"name":"Thread [Finalizer]"},{"id":4,"name":"Thread [Signal Dispatcher]"},{"id":5,"name":"Thread [Common-Cleaner]"}]},"seq":16,"type":"response"}
8f078f26 theia -> adapter: {"seq":9,"type":"request","command":"scopes","arguments":{"frameId":1}}
8f078f26 theia <- adapter: {"success":true,"request_seq":9,"command":"scopes","body":{"scopes":[{"name":"Local","variablesReference":3,"expensive":false}]},"seq":17,"type":"response"}
8f078f26 theia -> adapter: {"seq":10,"type":"request","command":"continue","arguments":{"threadId":1}}
8f078f26 theia <- adapter: {"success":true,"request_seq":10,"command":"continue","body":{"allThreadsContinued":false},"seq":18,"type":"response"}
8f078f26 theia <- adapter: {"event":"stopped","body":{"threadId":1,"reason":"breakpoint","allThreadsStopped":false,"type":"stopped"},"seq":19,"type":"event"}
8f078f26 theia -> adapter: {"seq":11,"type":"request","command":"threads","arguments":{}}
8f078f26 theia <- adapter: {"success":true,"request_seq":11,"command":"threads","body":{"threads":[{"id":1,"name":"Thread [main]"},{"id":2,"name":"Thread [Reference Handler]"},{"id":3,"name":"Thread [Finalizer]"},{"id":4,"name":"Thread [Signal Dispatcher]"},{"id":5,"name":"Thread [Common-Cleaner]"}]},"seq":20,"type":"response"}
8f078f26 theia -> adapter: {"seq":12,"type":"request","command":"stackTrace","arguments":{"startFrame":0,"levels":20,"threadId":1}}
8f078f26 theia <- adapter: {"success":true,"request_seq":12,"command":"stackTrace","body":{"stackFrames":[{"id":4,"line":27,"column":1,"name":"Helloworld.\u003cinit\u003e(String)"},{"id":5,"line":15,"column":1,"name":"Helloworld.\u003cinit\u003e()"},{"id":6,"line":44,"column":1,"name":"Helloworld.main(String[])"}],"totalFrames":3},"seq":21,"type":"response"}
8f078f26 theia -> adapter: {"seq":13,"type":"request","command":"scopes","arguments":{"frameId":4}}
8f078f26 theia <- adapter: {"success":true,"request_seq":13,"command":"scopes","body":{"scopes":[{"name":"Local","variablesReference":7,"expensive":false}]},"seq":22,"type":"response"}
8f078f26 theia -> adapter: {"seq":14,"type":"request","command":"continue","arguments":{"threadId":1}}
8f078f26 theia <- adapter: {"success":true,"request_seq":14,"command":"continue","body":{"allThreadsContinued":false},"seq":23,"type":"response"}
8f078f26 theia <- adapter: {"event":"stopped","body":{"threadId":1,"reason":"breakpoint","allThreadsStopped":false,"type":"stopped"},"seq":24,"type":"event"}
8f078f26 theia -> adapter: {"seq":15,"type":"request","command":"threads","arguments":{}}
8f078f26 theia <- adapter: {"success":true,"request_seq":15,"command":"threads","body":{"threads":[{"id":1,"name":"Thread [main]"},{"id":2,"name":"Thread [Reference Handler]"},{"id":3,"name":"Thread [Finalizer]"},{"id":4,"name":"Thread [Signal Dispatcher]"},{"id":5,"name":"Thread [Common-Cleaner]"}]},"seq":25,"type":"response"}
8f078f26 theia -> adapter: {"seq":16,"type":"request","command":"stackTrace","arguments":{"startFrame":0,"levels":20,"threadId":1}}
8f078f26 theia <- adapter: {"success":true,"request_seq":16,"command":"stackTrace","body":{"stackFrames":[{"id":1,"line":60,"column":1,"name":"Helloworld.main(String[])"}],"totalFrames":1},"seq":26,"type":"response"}
8f078f26 theia -> adapter: {"seq":17,"type":"request","command":"scopes","arguments":{"frameId":1}}
8f078f26 theia <- adapter: {"success":true,"request_seq":17,"command":"scopes","body":{"scopes":[{"name":"Local","variablesReference":2,"expensive":false}]},"seq":27,"type":"response"}
8f078f26 theia -> adapter: {"seq":18,"type":"request","command":"continue","arguments":{"threadId":1}}
8f078f26 theia <- adapter: {"event":"thread","body":{"reason":"exited","threadId":1,"type":"thread"},"seq":28,"type":"event"}
8f078f26 theia <- adapter: {"event":"thread","body":{"reason":"started","threadId":7,"type":"thread"},"seq":29,"type":"event"}
8f078f26 theia <- adapter: {"event":"thread","body":{"reason":"exited","threadId":7,"type":"thread"},"seq":30,"type":"event"}
8f078f26 theia <- adapter: {"event":"exited","body":{"exitCode":0,"type":"exited"},"seq":31,"type":"event"}
8f078f26 theia <- adapter: {"event":"terminated","body":{"restart":false,"type":"terminated"},"seq":32,"type":"event"}
8f078f26 theia <- adapter: {"success":true,"request_seq":18,"command":"continue","body":{"allThreadsContinued":false},"seq":33,"type":"response"}
8f078f26 theia -> adapter: {"seq":19,"type":"request","command":"threads","arguments":{}}
8f078f26 theia <- adapter: {"success":true,"request_seq":-1,"command":"terminate","seq":34,"type":"response"}
8f078f26 theia <- adapter: {"success":false,"message":"java.lang.NullPointerException","request_seq":-1,"command":"disconnect","body":{"error":{"id":1000,"format":"java.lang.NullPointerException"}},"seq":35,"type":"response"}
8f078f26 theia <- adapter: {"type":"event","event":"error","seq":-1,"body":{}}
8f078f26 theia <- adapter: {"type":"event","event":"error","seq":-1,"body":{}}

@ghost
Copy link
Author

ghost commented Sep 23, 2019

update for my app github link: https://github.com/rbcminghou/java-maven-helloworld

@tolusha
Copy link
Contributor

tolusha commented Sep 24, 2019

@rbcminghou
Could you also provide debug configuration and command to start application in debug mode?

@ghost
Copy link
Author

ghost commented Sep 24, 2019

The debug command:

java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -cp ./target/*.jar com.rbccm.app.Helloworld

The debug configuration (launch.json):

{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Debug (Attach)",
"request": "attach",
"hostName": "localhost",
"port": 8000
}
]
}

@amisevsk
Copy link
Contributor

amisevsk commented Sep 24, 2019

The above, formatted for readability:

The debug command:

java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -cp ./target/*.jar com.rbccm.app.Helloworld

The debug configuration (launch.json):

{
  "version": "0.2.0",
  "configurations": [
    {
        "type": "java",
        "name": "Debug (Attach)",
        "request": "attach",
        "hostName": "localhost",
        "port": 8000
    }
  ]
}

To add to the discussion, I've encountered this once before but did not have a chance to debug the issue (was during a demo). In my case, the environment was minishift + Che 7.1.0.

@ghost
Copy link
Author

ghost commented Sep 24, 2019

Thanks for the comments and my environment is OCP 3.11 + che 7.1.0.

@amisevsk
Copy link
Contributor

I've restarted a minishift a few times since this originally occurred for me, but I currently can't reproduce it.

@tolusha
Copy link
Contributor

tolusha commented Sep 25, 2019

I can't reproduce it either. (

@ghost
Copy link
Author

ghost commented Sep 25, 2019

Do I need to need the addition plugins or special configuration? Since my environment and setup are default but behind the firewall (all docker images have to be pulled and pushed into my private registry prior to exdecute chectl server:start).

@amisevsk
Copy link
Contributor

AFAIK debugging in Theia should work (and does work in your case, it just doesn't show the line highlight). I'm at a loss as to what the issue is, though, until I can reproduce it again.

@amisevsk amisevsk added the area/editor/theia Issues related to the che-theia IDE of Che label Sep 25, 2019
@amisevsk
Copy link
Contributor

Setting label area/che-theia since it looks like the highlight div and margin icon are not being updated when the breakpoint is hit.

From what I can tell, the line highlight should come from a div with class cdr theia-debug-top-stack-frame-line; I suspect the DOM is not getting updated to include it.

@ghost
Copy link
Author

ghost commented Sep 26, 2019

I just tried the debugging on my Windows chrome and the same result on my MacOS chrome with missing highlight.

@tsmaeder
Copy link
Contributor

@rbcminghou maybe sharing your devfile might help.

@ghost
Copy link
Author

ghost commented Sep 27, 2019

`

apiVersion: 1.0.0
metadata:
name: java-maven-helloworld
projects:

  • name: java-maven-helloworld
    source:
    type: git
    location: "https://xyz.com/java-maven-helloworld.git"
    components:
  • type: chePlugin
    id: redhat/java11/latest
  • type: dockerimage
    alias: maven
    image: xyz.com/eclipse/che-java11-maven:7.1.0-rbc
    env:
    • name: MAVEN_CONFIG
      value: /home/user/.m2
    • name: MAVEN_OPTS
      value: "-XX:MaxRAMPercentage=50 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10
      -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90
      -Dsun.zip.disableMemoryMapping=true -Xms20m -Djava.security.egd=file:/dev/./urandom
      -Duser.home=/home/user"
    • name: JAVA_OPTS
      value: "-XX:MaxRAMPercentage=50 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10
      -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90
      -Dsun.zip.disableMemoryMapping=true -Xms20m -Djava.security.egd=file:/dev/./urandom"
    • name: JAVA_TOOL_OPTIONS
      value: "-XX:MaxRAMPercentage=50 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10
      -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90
      -Dsun.zip.disableMemoryMapping=true -Xms20m -Djava.security.egd=file:/dev/./urandom"
      memoryLimit: 1024Mi
      endpoints:
    • name: '8080/tcp'
      port: 8080
      mountSources: true
      volumes:
    • name: m2
      containerPath: /home/user/.m2
      commands:
  • name: maven build
    actions:
    • type: exec
      component: maven
      command: "mvn -Duser.home=${HOME} -s settings.xml clean install"
      workdir: ${CHE_PROJECTS_ROOT}/java-maven-helloworld
  • name: maven build and run
    actions:
    • type: exec
      component: maven
      command: "mvn -Duser.home=${HOME} -s settings.xml clean install && java -cp ./target/*.jar com.rbccm.app.Helloworld"
      workdir: ${CHE_PROJECTS_ROOT}/java-maven-helloworld
  • name: run
    actions:
    • type: exec
      component: maven
      command: "java -cp ./target/*.jar com.rbccm.app.Helloworld"
      workdir: ${CHE_PROJECTS_ROOT}/java-maven-helloworld
  • name: debug
    actions:
    • type: exec
      component: maven
      command: "java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -cp ./target/*.jar com.rbccm.app.Helloworld"
      workdir: ${CHE_PROJECTS_ROOT}/java-maven-helloworld

`

@amisevsk
Copy link
Contributor

I don't think it's a devfile-specific issue, since I had it occur once when running a known-working devfile.

@ghost
Copy link
Author

ghost commented Oct 8, 2019

updated to 7.2.0 and the issue is still there...

@amisevsk
Copy link
Contributor

amisevsk commented Oct 8, 2019

I have been unable to reproduce on any of my deployments since the one time it happened for me. I'm at a loss on this issue.

@ghost
Copy link
Author

ghost commented Oct 10, 2019

If I type the Java code in the editor directly, and it works fine:

Screen Shot 2019-10-10 at 4 06 50 PM

And, I realized there is the title option "Run|Debug".

But, the first screenshot at the begin message was imported from github and it does not have "Run|Debug" on the top of my main function. How do I enable it?

@tsmaeder
Copy link
Contributor

@rbcminghou that would indicate that the project is not recognized as a java project by the java language server. Does refreshing the browser help? Otherwise, try the "clean the java language server workspace" command.

@ghost
Copy link
Author

ghost commented Oct 11, 2019

No help after refreshing my chrome browser.

The "clean the java language server workspace" command works once to get "Run|Debug".

Delete the workspace and get the project back from github, then try the "clean the java language server workspace" command, "Run|Debug" does not shown again.

Update:
My environment is behind the firewall and need the proxy setup. Therefore, I copy the settings.xml to /home/users/.m2 and execute the "clean the java language server workspace" command. The "Run|Debug" shows up.

  1. will JLS will check the pom.xml and ensure dependencies are okay?
  2. can we use devfile to copy settings.xml to /home/users/.m2 when the workspace is starting up?

@tsmaeder
Copy link
Contributor

Yes, jdt.ls does not pick up new projects after it has been initialized: eclipse-jdtls/eclipse.jdt.ls#901
Doing a browser refresh should restart the language server, though.

@ghost
Copy link
Author

ghost commented Oct 11, 2019

yes, the refresh browser works now after copying settings.xml (contain the proxy settings) to /home/user/.m2

@che-bot che-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 7, 2021
@che-bot
Copy link
Contributor

che-bot commented Jun 7, 2021

Issues go stale after 180 days of inactivity. lifecycle/stale issues rot after an additional 7 days of inactivity and eventually close.

Mark the issue as fresh with /remove-lifecycle stale in a new comment.

If this issue is safe to close now please do so.

Moderators: Add lifecycle/frozen label to avoid stale mode.

@l0rd l0rd closed this as completed Jun 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/editor/theia Issues related to the che-theia IDE of Che lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. status/analyzing An issue has been proposed and it is currently being analyzed for effort and implementation approach
Projects
None yet
Development

No branches or pull requests

5 participants