vscode-java-debug icon indicating copy to clipboard operation
vscode-java-debug copied to clipboard

How to set timeout for VM

Open clankill3r opened this issue 6 years ago • 2 comments

I'm altering classes with javassist and I have reason to believe this takes longer then 10 seconds. I get the following:

Screen Shot 2019-11-11 at 22 25 38

And I was wondering, can I make that time period longer?

best Doeke

clankill3r avatar Nov 11 '19 22:11 clankill3r

Not supported yet. We didn't expose the timeout setting for the launching.

We only expose the timeout in launch.json for remote debugging.

testforstephen avatar Nov 12 '19 01:11 testforstephen

Hi @clankill3r, I'm an AI Support assistant here to help with your issue. While the team reviews your request, I wanted to provide some possible tips and documentation that might help you in the meantime.

You can increase the debug-attach timeout by adding a timeout attribute (in milliseconds) to your launch.json. For example:

{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "java",
      "name": "Debug (Launch)",
      "request": "launch",
      "mainClass": "com.example.Main",
      "timeout": 30000     // wait up to 30 seconds for the VM to start
    }
  ]
}

• See the official Java Debug configuration docs for all supported attributes: • https://github.com/microsoft/vscode-java-debug#configuration-attributes

Other references with low confidence

• Failed to attach to remote debuggee VM (suggests how the extension code uses a timeout): • Description: shows setting a 500 ms wait in BaseRunner.ts when programmatically attaching • URL: https://github.com/microsoft/java-debug/issues/252#issuecomment-451335304

The team will respond to your issue shortly. I hope these suggestions are helpful in the meantime. If this comment helped you, please give it a 👍. If the suggestion was not helpful or incorrect, please give it a 👎. Your feedback helps us improve!

github-actions[bot] avatar Nov 11 '25 12:11 github-actions[bot]