microsoft / microsoft/vscode-java-debug

cant remote debug on tomcat via attach

Open
#585 14 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ai-triaged attach question
Dominant language
TypeScript
Stars
591
Forks
429
Avg merge
1d 9h
Merged PRs (30d)
19

Description

i'm trying to remote debug my application, which is running on a tomcat.

Environment
  • Operating System: mac OS 10.14.4
  • JDK version: 1.8.0_131
  • Visual Studio Code version: 1.34.0
  • Java extension version: 0.7.1
  • Java Debugger extension version: 0.18.0
Steps To Reproduce

my configuration:

{
  // Use IntelliSense to learn about possible attributes.
  // Hover to view descriptions of existing attributes.
  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
  "version": "0.2.0",
  "configurations": [
    {
        "type": "java",
        "name": "Debug (Attach) - Remote",
        "request": "attach",
        "hostName": "localhost",
        "port": 8090
    },
  ]
}

[attach a sample project reproducing the error]
attach logs

Current Result

i'm getting an error message in vscode: Timeout occured while waiting for packet 106

Expected Result

debugger attaches to the remote tomcat just fine

Additional Informations

the same configuration works with intelliJ idea, so it should work in vscode.
idea connects fine with host: localhost, port: 8090
idea shows these params: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8090
do i have to add them somewhere for vscode?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the provided launch configuration and the troubleshooting logging instructions, then compare the VS Code attach path with the JDWP parameters that IntelliJ uses. Done means identifying why the localhost:8090 Tomcat target times out and confirming that the debugger attaches successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, vscode
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.