diff --git a/.azure-pipelines/ci.yml b/.azure-pipelines/ci.yml
new file mode 100644
index 00000000..7602a73e
--- /dev/null
+++ b/.azure-pipelines/ci.yml
@@ -0,0 +1,70 @@
+name: $(Date:yyyyMMdd).$(Rev:r)
+variables:
+ - name: Codeql.Enabled
+ value: true
+resources:
+ repositories:
+ - repository: self
+ type: git
+ ref: refs/heads/main
+ - repository: 1esPipelines
+ type: git
+ name: 1ESPipelineTemplates/1ESPipelineTemplates
+ ref: refs/tags/release
+trigger:
+ branches:
+ include:
+ - main
+extends:
+ template: v1/1ES.Unofficial.PipelineTemplate.yml@1esPipelines
+ parameters:
+ pool:
+ os: linux
+ name: 1ES_JavaTooling_Pool
+ image: 1ES_JavaTooling_Ubuntu-2004
+ sdl:
+ sourceAnalysisPool:
+ name: 1ES_JavaTooling_Pool
+ image: 1ES_JavaTooling_Windows_2022
+ os: windows
+ customBuildTags:
+ - MigrationTooling-mseng-VSJava-9181-Tool
+ stages:
+ - stage: Build
+ jobs:
+ - job: Job_1
+ displayName: VSCode-Java-Debug-CI
+ templateContext:
+ outputs:
+ - output: pipelineArtifact
+ artifactName: vsix
+ targetPath: $(Build.ArtifactStagingDirectory)/vsix
+ displayName: "Publish Artifact: vsix"
+ steps:
+ - checkout: self
+ fetchTags: true
+ - task: JavaToolInstaller@0
+ displayName: Use Java 17
+ inputs:
+ versionSpec: "17"
+ jdkArchitectureOption: x64
+ jdkSourceOption: PreInstalled
+ - task: Npm@1
+ displayName: npm install
+ inputs:
+ verbose: false
+ - task: CmdLine@2
+ displayName: build server
+ inputs:
+ script: |-
+ git clone https://github.com/microsoft/java-debug ../java-debug
+ npm run build-server
+ - task: CmdLine@2
+ displayName: vsce package
+ inputs:
+ script: npx @vscode/vsce@latest package
+ - task: CopyFiles@2
+ displayName: "Copy Files to: $(Build.ArtifactStagingDirectory)/vsix"
+ inputs:
+ Contents: "*.vsix"
+ TargetFolder: $(Build.ArtifactStagingDirectory)/vsix
diff --git a/.azure-pipelines/nightly.yml b/.azure-pipelines/nightly.yml
new file mode 100644
index 00000000..cee075e2
--- /dev/null
+++ b/.azure-pipelines/nightly.yml
@@ -0,0 +1,121 @@
+name: $(Date:yyyyMMdd).$(Rev:r)
+variables:
+ - name: Codeql.Enabled
+ value: true
+schedules:
+ - cron: 0 7 * * 1,2,3,4,5
+ branches:
+ include:
+ - refs/heads/main
+resources:
+ pipelines:
+ - pipeline: microsoft.java-debug.signjars.nightly
+ source: microsoft.java-debug.signjars.nightly
+ trigger:
+ branches:
+ include:
+ - refs/heads/main
+ repositories:
+ - repository: self
+ type: git
+ ref: refs/heads/main
+ - repository: MicroBuildTemplate
+ type: git
+ name: 1ESPipelineTemplates/MicroBuildTemplate
+trigger: none
+extends:
+ template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate
+ parameters:
+ pool:
+ name: MSEngSS-MicroBuild2022-1ES
+ stages:
+ - stage: Build
+ jobs:
+ - job: Job_1
+ displayName: VSCode-Java-Debug-Nightly
+ templateContext:
+ mb:
+ signing:
+ enabled: true
+ signType: real
+ zipSources: false
+ feedSource: 'https://mseng.pkgs.visualstudio.com/DefaultCollection/_packaging/MicroBuildToolset/nuget/v3/index.json'
+ outputs:
+ - output: pipelineArtifact
+ artifactName: vsix
+ targetPath: $(Build.ArtifactStagingDirectory)/vsix
+ displayName: "Publish Artifact: vsix"
+ steps:
+ - checkout: self
+ fetchTags: false
+ - task: NodeTool@0
+ displayName: Use Node 20.x
+ inputs:
+ versionSpec: 20.x
+ - task: DownloadBuildArtifacts@1
+ displayName: Download Build Artifacts
+ inputs:
+ buildType: specific
+ project: a4d27ce2-a42d-4b71-8eef-78cee9a9728e
+ definition: "16485"
+ specificBuildWithTriggering: true
+ downloadType: specific
+ itemPattern: plugin/jars/com.microsoft.java.debug.plugin-*.jar
+ extractTars: false
+ - task: CopyFiles@2
+ displayName: 'cp plugin.jar to server'
+ inputs:
+ SourceFolder: '$(System.ArtifactsDirectory)/plugin/jars'
+ Contents: 'com.microsoft.java.debug.plugin-*.jar'
+ TargetFolder: $(Build.SourcesDirectory)/server
+ - task: Npm@1
+ displayName: npm install
+ inputs:
+ verbose: false
+ - task: CmdLine@2
+ displayName: Update nightly vsix version
+ inputs:
+ script: node scripts/build/prepare-nightly-build.js
+ - task: CmdLine@2
+ displayName: Replace AI key
+ inputs:
+ script: npx json@9.0.6 -I -f package.json -e "this.aiKey=\"%AI_KEY%\""
+ - task: CmdLine@2
+ displayName: vsce package --pre-release -o extension.vsix
+ inputs:
+ script: npx @vscode/vsce@latest package --pre-release -o extension.vsix
+ ### Copy files for APIScan
+ - task: CopyFiles@2
+ displayName: "Copy Files for APIScan"
+ inputs:
+ Contents: "*.vsix"
+ TargetFolder: $(Agent.TempDirectory)/APIScanFiles
+ condition: and(succeeded(), ne(variables['DisableAPIScan'], 'true'))
+ ### Run latest version of APIScan listed at https://www.1eswiki.com/wiki/APIScan_Build_Task
+ - task: APIScan@2
+ displayName: Run APIScan
+ inputs:
+ softwareFolder: $(Agent.TempDirectory)/APIScanFiles
+ softwareName: "vscode-java-debug"
+ softwareVersionNum: "$(Build.BuildId)"
+ isLargeApp: false
+ toolVersion: "Latest"
+ condition: and(succeeded(), ne(variables['DisableAPIScan'], 'true'))
+ env:
+ AzureServicesAuthConnectionString: runAs=App;AppId=$(ApiScanClientId);TenantId=$(ApiScanTenant);AppKey=$(ApiScanSecret)
+ - script: npx @vscode/vsce@latest generate-manifest -i extension.vsix -o extension.manifest
+ displayName: 'Generate extension manifest'
+ - script: copy extension.manifest extension.signature.p7s
+ displayName: 'Prepare manifest for signing'
+ - task: CmdLine@2
+ displayName: Sign extension
+ inputs:
+ script: dotnet %MBSIGN_APPFOLDER%/ddsignfiles.dll /file:extension.signature.p7s /certs:4014052
+ - task: CopyFiles@2
+ displayName: "Copy Files to: $(Build.ArtifactStagingDirectory)/vsix"
+ inputs:
+ Contents: |
+ extension.vsix
+ extension.manifest
+ extension.signature.p7s
+ TargetFolder: $(Build.ArtifactStagingDirectory)/vsix
\ No newline at end of file
diff --git a/.azure-pipelines/rc.yml b/.azure-pipelines/rc.yml
new file mode 100644
index 00000000..91c5251e
--- /dev/null
+++ b/.azure-pipelines/rc.yml
@@ -0,0 +1,119 @@
+name: $(Date:yyyyMMdd).$(Rev:r)
+variables:
+ - name: Codeql.Enabled
+ value: true
+resources:
+ pipelines:
+ - pipeline: microsoft.java-debug.signjars.rc
+ source: microsoft.java-debug.signjars.rc
+ trigger:
+ branches:
+ include:
+ - main
+ repositories:
+ - repository: self
+ type: git
+ ref: refs/heads/main
+ - repository: MicroBuildTemplate
+ type: git
+ name: 1ESPipelineTemplates/MicroBuildTemplate
+trigger: none
+extends:
+ template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate
+ parameters:
+ pool:
+ name: MSEngSS-MicroBuild2022-1ES
+ stages:
+ - stage: Build
+ jobs:
+ - job: Job_1
+ displayName: VSCode-Java-Debug-RC
+ templateContext:
+ mb:
+ signing:
+ enabled: true
+ signType: real
+ zipSources: false
+ feedSource: 'https://mseng.pkgs.visualstudio.com/DefaultCollection/_packaging/MicroBuildToolset/nuget/v3/index.json'
+ outputs:
+ - output: pipelineArtifact
+ artifactName: vsix
+ targetPath: $(Build.ArtifactStagingDirectory)/vsix
+ displayName: "Publish Artifact: vsix"
+ steps:
+ - checkout: self
+ fetchTags: true
+ - task: NodeTool@0
+ displayName: Use Node 20.x
+ inputs:
+ versionSpec: 20.x
+ - task: DownloadBuildArtifacts@1
+ displayName: Download Build Artifacts
+ inputs:
+ buildType: specific
+ project: a4d27ce2-a42d-4b71-8eef-78cee9a9728e
+ definition: "16486"
+ specificBuildWithTriggering: true
+ downloadType: specific
+ itemPattern: m2/com.microsoft.java.debug.plugin/com.microsoft.java.debug.plugin-*.jar
+ extractTars: false
+ - task: CopyFiles@2
+ displayName: 'cp plugin.jar to server'
+ inputs:
+ SourceFolder: '$(System.ArtifactsDirectory)/m2/com.microsoft.java.debug.plugin'
+ Contents: |
+ com.microsoft.java.debug.plugin-*.jar
+ TargetFolder: $(Build.SourcesDirectory)/server
+ - task: CmdLine@2
+ displayName: Delete sources.jar and javadoc.jar from server
+ inputs:
+ script: |
+ del server\com.microsoft.java.debug.plugin-*-sources.jar
+ del server\com.microsoft.java.debug.plugin-*-javadoc.jar
+ - task: Npm@1
+ displayName: npm install
+ inputs:
+ verbose: false
+ - task: CmdLine@2
+ displayName: Replace AI key
+ inputs:
+ script: npx json@9.0.6 -I -f package.json -e "this.aiKey=\"%AI_KEY%\""
+ - task: CmdLine@2
+ displayName: vsce package
+ inputs:
+ script: npx @vscode/vsce@latest package -o extension.vsix
+ ### Copy files for APIScan
+ - task: CopyFiles@2
+ displayName: "Copy Files for APIScan"
+ inputs:
+ Contents: "*.vsix"
+ TargetFolder: $(Agent.TempDirectory)/APIScanFiles
+ condition: and(succeeded(), ne(variables['DisableAPIScan'], 'true'))
+ ### Run latest version of APIScan listed at https://www.1eswiki.com/wiki/APIScan_Build_Task
+ - task: APIScan@2
+ displayName: Run APIScan
+ inputs:
+ softwareFolder: $(Agent.TempDirectory)/APIScanFiles
+ softwareName: "vscode-java-debug"
+ softwareVersionNum: "$(Build.BuildId)"
+ isLargeApp: false
+ toolVersion: "Latest"
+ condition: and(succeeded(), ne(variables['DisableAPIScan'], 'true'))
+ env:
+ AzureServicesAuthConnectionString: runAs=App;AppId=$(ApiScanClientId);TenantId=$(ApiScanTenant);AppKey=$(ApiScanSecret)
+ - script: npx @vscode/vsce@latest generate-manifest -i extension.vsix -o extension.manifest
+ displayName: 'Generate extension manifest'
+ - script: copy extension.manifest extension.signature.p7s
+ displayName: 'Prepare manifest for signing'
+ - task: CmdLine@2
+ displayName: Sign extension
+ inputs:
+ script: dotnet %MBSIGN_APPFOLDER%/ddsignfiles.dll /file:extension.signature.p7s /certs:4014052
+ - task: CopyFiles@2
+ displayName: "Copy Files to: $(Build.ArtifactStagingDirectory)/vsix"
+ inputs:
+ Contents: |
+ extension.vsix
+ extension.manifest
+ extension.signature.p7s
+ TargetFolder: $(Build.ArtifactStagingDirectory)/vsix
diff --git a/.azure-pipelines/release-nightly.yml b/.azure-pipelines/release-nightly.yml
new file mode 100644
index 00000000..119d9e1f
--- /dev/null
+++ b/.azure-pipelines/release-nightly.yml
@@ -0,0 +1,55 @@
+# This pipeline is used to release the VS Code Java Debug extension from the nightly/stable build.
+# It contains following steps:
+# 1. Download the plugin artifact from the nightly/stable build pipeline.
+# 2. Publish the plugin to the marketplace.
+
+name: $(Date:yyyyMMdd).$(Rev:r) # Use the current date and a revision number for the build name.
+
+variables:
+ - name: Codeql.Enabled
+ value: true
+resources:
+ repositories:
+ - repository: self
+ type: git
+ ref: refs/heads/main
+ - repository: 1esPipelines
+ type: git
+ name: 1ESPipelineTemplates/1ESPipelineTemplates
+ ref: refs/tags/release
+trigger: none
+extends:
+ template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
+ parameters:
+ pool:
+ os: linux
+ name: 1ES_JavaTooling_Pool
+ image: 1ES_JavaTooling_Ubuntu-2004
+ stages:
+ - stage: Release
+ jobs:
+ - job: Job
+ displayName: Release VS Code Java Debug Extension
+ templateContext:
+ type: releaseJob
+ isProduction: true
+ inputs:
+ - input: pipelineArtifact
+ buildType: specific
+ project: $(AzDo.ProjectId) # Azure DevOps project ID
+ definition: $(AzDo.BuildPipelineId) # artifact build pipeline ID
+ artifactName: vsix
+ downloadType: specific
+ targetPath: '$(Build.SourcesDirectory)'
+ steps:
+ - task: UseNode@1
+ displayName: 'Use Node.js 20.x'
+ inputs:
+ version: '20.x'
+ - task: AzureCLI@2
+ displayName: 'Publish Extension'
+ inputs:
+ azureSubscription: 'VSCode-Ext-Publishing'
+ scriptType: pscore
+ scriptLocation: inlineScript
+ inlineScript: 'npx @vscode/vsce@latest publish -i ''$(Build.SourcesDirectory)/extension.vsix'' --manifestPath ''$(Build.SourcesDirectory)/extension.manifest'' --signaturePath ''$(Build.SourcesDirectory)/extension.signature.p7s'' --azure-credential'
\ No newline at end of file
diff --git a/.azure-pipelines/release.yml b/.azure-pipelines/release.yml
new file mode 100644
index 00000000..119d9e1f
--- /dev/null
+++ b/.azure-pipelines/release.yml
@@ -0,0 +1,55 @@
+# This pipeline is used to release the VS Code Java Debug extension from the nightly/stable build.
+# It contains following steps:
+# 1. Download the plugin artifact from the nightly/stable build pipeline.
+# 2. Publish the plugin to the marketplace.
+
+name: $(Date:yyyyMMdd).$(Rev:r) # Use the current date and a revision number for the build name.
+
+variables:
+ - name: Codeql.Enabled
+ value: true
+resources:
+ repositories:
+ - repository: self
+ type: git
+ ref: refs/heads/main
+ - repository: 1esPipelines
+ type: git
+ name: 1ESPipelineTemplates/1ESPipelineTemplates
+ ref: refs/tags/release
+trigger: none
+extends:
+ template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
+ parameters:
+ pool:
+ os: linux
+ name: 1ES_JavaTooling_Pool
+ image: 1ES_JavaTooling_Ubuntu-2004
+ stages:
+ - stage: Release
+ jobs:
+ - job: Job
+ displayName: Release VS Code Java Debug Extension
+ templateContext:
+ type: releaseJob
+ isProduction: true
+ inputs:
+ - input: pipelineArtifact
+ buildType: specific
+ project: $(AzDo.ProjectId) # Azure DevOps project ID
+ definition: $(AzDo.BuildPipelineId) # artifact build pipeline ID
+ artifactName: vsix
+ downloadType: specific
+ targetPath: '$(Build.SourcesDirectory)'
+ steps:
+ - task: UseNode@1
+ displayName: 'Use Node.js 20.x'
+ inputs:
+ version: '20.x'
+ - task: AzureCLI@2
+ displayName: 'Publish Extension'
+ inputs:
+ azureSubscription: 'VSCode-Ext-Publishing'
+ scriptType: pscore
+ scriptLocation: inlineScript
+ inlineScript: 'npx @vscode/vsce@latest publish -i ''$(Build.SourcesDirectory)/extension.vsix'' --manifestPath ''$(Build.SourcesDirectory)/extension.manifest'' --signaturePath ''$(Build.SourcesDirectory)/extension.signature.p7s'' --azure-credential'
\ No newline at end of file
diff --git a/.editorconfig b/.editorconfig
index d24a06ef..d1be8048 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -10,7 +10,7 @@ indent_size = 4
# The indent size used in the `package.json` file cannot be changed
# https://github.com/npm/npm/pull/3180#issuecomment-16336516
-[{.travis.yml,npm-shrinkwrap.json,package.json}]
+[{.github/workflows/build.yml,npm-shrinkwrap.json,package.json}]
indent_size = 2
[vendor/**.js]
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
new file mode 100644
index 00000000..b11684f5
--- /dev/null
+++ b/.github/CODEOWNERS
@@ -0,0 +1 @@
+* @testforstephen @jdneo
\ No newline at end of file
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 00000000..659a2557
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,123 @@
+name: CI
+
+on:
+ push:
+ branches: [ main ]
+ pull_request:
+ branches: [ main ]
+
+jobs:
+ linux:
+ name: Linux
+ runs-on: ubuntu-latest
+ timeout-minutes: 30
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Setup Build Environment
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y libxkbfile-dev pkg-config libsecret-1-dev libxss1 dbus xvfb libgtk-3-0 libgbm1
+ sudo /usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
+ sleep 3
+
+ - name: Set up JDK 11
+ uses: actions/setup-java@v1
+ with:
+ java-version: '11'
+
+ - name: Setup Node.js environment
+ uses: actions/setup-node@v2
+ with:
+ node-version: 20
+
+ - name: Install Node.js modules
+ run: npm install
+
+ - name: Install build tools
+ run: npm install -g @vscode/vsce typescript
+
+ - name: Lint
+ run: npm run tslint
+
+ - name: Package
+ run: vsce package
+
+ - name: Test extension
+ run: DISPLAY=:99 npm test
+
+ - name: Print language server Log if job failed
+ if: ${{ failure() }}
+ run: find $HOME/.config/Code/User/workspaceStorage/*/redhat.java/jdt_ws/.metadata/.log -print -exec cat '{}' \;;
+
+ windows:
+ name: Windows
+ runs-on: windows-latest
+ timeout-minutes: 30
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Set up JDK 11
+ uses: actions/setup-java@v1
+ with:
+ java-version: '11'
+
+ - name: Setup Node.js environment
+ uses: actions/setup-node@v2
+ with:
+ node-version: 20
+
+ - name: Install Node.js modules
+ run: npm install
+
+ - name: Install build tools
+ run: npm install -g @vscode/vsce typescript --force
+
+ - name: Lint
+ run: npm run tslint
+
+ - name: Package
+ run: vsce package
+
+ - name: Test extension
+ run: npm test
+
+ - name: Print language server Log if job failed
+ if: ${{ failure() }}
+ run: Get-ChildItem -Path $env:APPDATA/Code/User/workspaceStorage/*/redhat.java/jdt_ws/.metadata/.log | cat
+
+ darwin:
+ name: macOS
+ runs-on: macos-latest
+ timeout-minutes: 30
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Set up JDK 11
+ uses: actions/setup-java@v1
+ with:
+ java-version: '11'
+
+ - name: Setup Node.js environment
+ uses: actions/setup-node@v2
+ with:
+ node-version: 20
+
+ - name: Install Node.js modules
+ run: npm install
+
+ - name: Install build tools
+ run: npm install -g @vscode/vsce typescript
+
+ - name: Lint
+ run: npm run tslint
+
+ - name: Package
+ run: vsce package
+
+ - name: Test extension
+ run: npm test
+
+ - name: Print language server Log if job failed
+ if: ${{ failure() }}
+ run: find $HOME/Library/Application\ Support/Code/User/workspaceStorage/*/redhat.java/jdt_ws/.metadata/.log -print -exec cat '{}' \;;
diff --git a/.github/workflows/no-response.yml b/.github/workflows/no-response.yml
new file mode 100644
index 00000000..4cc4c9fc
--- /dev/null
+++ b/.github/workflows/no-response.yml
@@ -0,0 +1,26 @@
+name: No Response
+
+# **What it does**: Closes issues where the original author doesn't respond to a request for information.
+# **Why we have it**: To remove the need for maintainers to remember to check back on issues periodically to see if contributors have responded.
+# **Who does it impact**: Everyone that works on docs or docs-internal.
+
+on:
+ issue_comment:
+ types: [created]
+ schedule:
+ # every morning at 00:00 am
+ - cron: '0 0 * * *'
+
+jobs:
+ noResponse:
+ runs-on: ubuntu-latest
+ permissions:
+ issues: write
+ steps:
+ - uses: lee-dohm/no-response@9bb0a4b5e6a45046f00353d5de7d90fb8bd773bb #v0.5.0
+ with:
+ token: ${{ github.token }}
+ daysUntilClose: 14 # Number of days of inactivity before an Issue is closed for lack of response
+ responseRequiredLabel: "needs more info" # Label indicating that a response from the original author is required
+ closeComment: >
+ This issue has been closed automatically because it needs more information and has not had recent activity. Please reach out if you have or find the answers we need so that we can investigate further.
diff --git a/.gitignore b/.gitignore
index 2d53e090..98790543 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,5 +2,8 @@ out
bin
server
node_modules
-.vscode-test
-vscode-java-debug-*.vsix
\ No newline at end of file
+.vscode-test/
+vscode-java-debug-*.vsix
+packages/
+dist
+.DS_Store
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 0ae05300..00000000
--- a/.travis.yml
+++ /dev/null
@@ -1,26 +0,0 @@
-language: node_js
-
-node_js:
-- 'node'
-
-os:
-- linux
-- osx
-
-before_install:
-- if [ $TRAVIS_OS_NAME == "linux" ]; then
- export CXX="g++-4.9" CC="gcc-4.9" DISPLAY=:99.0;
- sh -e /etc/init.d/xvfb start;
- sleep 3;
- fi
-
-install:
-- npm install -g vsce
-- npm install -g typescript
-- npm install -g gulp
-- npm install
-
-script:
-- gulp tslint
-- vsce package
-- npm test --silent
diff --git a/.vscode/launch.json b/.vscode/launch.json
index cd6b87bd..0ac35d26 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -10,19 +10,24 @@
"args": ["--extensionDevelopmentPath=${workspaceRoot}" ],
"stopOnEntry": false,
"sourceMaps": true,
- "outFiles": [ "${workspaceRoot}/out/src/**/*.js" ],
- "preLaunchTask": "npm"
+ "outFiles": [ "${workspaceRoot}/dist/**/*.js" ],
+ "preLaunchTask": "npm: watch",
+ "env": {
+ "DEBUG_VSCODE_JAVA":"true"
+ }
},
{
- "name": "Launch Tests",
+ "name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
- "args": ["--extensionDevelopmentPath=${workspaceRoot}", "--extensionTestsPath=${workspaceRoot}/out/test" ],
- "stopOnEntry": false,
+ "args": [
+ "--extensionDevelopmentPath=${workspaceFolder}",
+ "--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
+ ],
"sourceMaps": true,
- "outFiles": [ "${workspaceRoot}/out/test/**/*.js" ],
- "preLaunchTask": "npm"
- }
+ "outFiles": ["${workspaceFolder}/out/test/**/*.js"],
+ "preLaunchTask": "npm: compile"
+ }
]
}
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
index 99d84d1d..114cae50 100644
--- a/.vscode/tasks.json
+++ b/.vscode/tasks.json
@@ -9,27 +9,34 @@
// A task runner that calls a custom npm script that compiles the extension.
{
"version": "2.0.0",
-
- // we want to run npm
- "command": "npm",
-
- // the command is a shell script
- "type": "shell",
-
- // show the output window only if unrecognized errors occur.
- "presentation": {
- "echo": true,
- "reveal": "silent",
- "focus": false,
- "panel": "shared"
- },
-
- // we run the custom script "compile" as defined in package.json
- "args": ["run", "compile", "--loglevel", "silent"],
-
- // The tsc compiler is started in watching mode
- "isBackground": true,
-
- // use the standard tsc in watch mode problem matcher to find compile problems in the output.
- "problemMatcher": "$tsc-watch"
+ "tasks": [
+ {
+ "type": "npm",
+ "script": "watch",
+ "problemMatcher": {
+ "owner": "typescript",
+ "pattern": [
+ {
+ "regexp": "\\[tsl\\] ERROR",
+ "file": 1,
+ "location": 2,
+ "message": 3
+ }
+ ],
+ "background": {
+ "activeOnStart": true,
+ "beginsPattern": "Compiler '[^']+' starting",
+ "endsPattern": "Compiler '[^']+' finished"
+ }
+ },
+ "isBackground": true,
+ "presentation": {
+ "reveal": "never"
+ },
+ "group": {
+ "kind": "build",
+ "isDefault": true
+ }
+ }
+ ]
}
\ No newline at end of file
diff --git a/.vscodeignore b/.vscodeignore
index cdeca6b8..9c5a198b 100644
--- a/.vscodeignore
+++ b/.vscodeignore
@@ -1,9 +1,21 @@
.vscode/**
.vscode-test/**
-out/test/**
+out/**
test/**
src/**
**/*.map
tsconfig.json
-gulpfile.js
+scripts/build/**
.gitignore
+images/docs/**
+testprojects/**
+TestPlan.md
+.github/**
+tsconfig.json
+tslint.json
+packages
+package-lock.json
+node_modules
+webpack.config.js
+.DS_Store
+.azure-pipelines/**
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fe6dda97..810a2c50 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,8 +1,617 @@
# Change Log
All notable changes to the "vscode-java-debugger" extension will be documented in this file.
-The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
-and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
+The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
+and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+
+## 0.58.2 - 2025-04-28
+### Fixed
+- Provide graceful shutdown on debug stop action. [#1274](https://github.com/microsoft/vscode-java-debug/issues/1274). Thanks to [Dave Syer](https://github.com/dsyer) for contribution.
+
+### Changed
+- Update Apache Commons IO from 2.11.0 to 2.19.0. [java-debug#585](https://github.com/microsoft/java-debug/pull/585). Thanks to [Roland Grunberg](https://github.com/rgrunber) for contribution.
+
+## 0.58.1 - 2024-10-31
+### Added
+- The launch config `envFile` now supports an array of env files. [#1505](https://github.com/microsoft/vscode-java-debug/issues/1505). Thanks to [Ed Hillmann](https://github.com/hildo) for contribution.
+
+### Fixed
+- Fail to debug with java 23 - Unrecognized option: -Xnoagent. [java-debug#561](https://github.com/microsoft/java-debug/issues/561).
+
+## 0.58.0 - 2024-06-27
+### Fixed
+- Latest Gradle Language Support extension cause hot code replace to fail. [#1402](https://github.com/microsoft/vscode-java-debug/issues/1402).
+- Hot Code Replace returns "Cannot find any changed classes for hot replace!" message. [#1481](https://github.com/microsoft/vscode-java-debug/issues/1481).
+
+## 0.57.0 - 2024-03-26
+### Added
+- Add support for running Java 21 "Unnamed classes and Instance main method". [#1444](https://github.com/microsoft/vscode-java-debug/issues/1444).
+
+## 0.56.2 - 2024-02-28
+### Changed
+- Move 'Run/Debug Java' menus to the same group as the other Java menus within File Explorer. [#1447](https://github.com/microsoft/vscode-java-debug/pull/1447).
+
+## 0.56.1 - 2024-02-19
+### Fixed
+- Fix the java.lang.NoClassDefFoundError when triggering code completion in DEBUG CONSOLE. See [java-debug#534](https://github.com/microsoft/java-debug/issues/534).
+
+## 0.56.0 - 2024-01-31
+### Fixed
+- Breakpoint doesn't work on lambdas which returns a generic type. See [java-debug#498](https://github.com/microsoft/java-debug/issues/498), [#1413](https://github.com/microsoft/vscode-java-debug/issues/1413) and [#1414](https://github.com/microsoft/vscode-java-debug/issues/1414).
+- Breakpoint with inline lambdas work only with last one. See [#1410](https://github.com/microsoft/vscode-java-debug/issues/1410).
+- StepInto method target doesn't work if the method is part of wrapped expression. See [java-debug#519](https://github.com/microsoft/java-debug/issues/519).
+
+ Thanks to [Gayan Perera](https://github.com/gayanper) for contribution in fixing multiple bugs.
+
+## 0.55.0 - 2023-11-01
+### Changed
+- Don't duplicate build reference projects when building a Gradle project managed by Build Server. [java-debug#511](https://github.com/microsoft/java-debug/pull/511).
+
+### Fixed
+- Cannot find Java process when using "Attach by Process ID". [#1388](https://github.com/microsoft/vscode-java-debug/issues/1388). Thanks to [owl-from-hogvarts](https://github.com/owl-from-hogvarts) for contribution.
+
+## 0.54.0 - 2023-08-29
+### Added
+- Code completion in DEBUG CONSOLE now adds fully qualified names for unimported classes. See [#1246](https://github.com/microsoft/vscode-java-debug/issues/1246).
+- Code completion in DEBUG CONSOLE now displays package names for suggested types. See [java-debug#505](https://github.com/microsoft/java-debug/pull/505).
+- Integrate the build support for Gradle build server project. See [#1372](https://github.com/microsoft/vscode-java-debug/pull/1372), [java-debug#503](https://github.com/microsoft/java-debug/pull/503)
+
+### Changed
+- Respect the setting 'java.debug.settings.forceBuildBeforeLaunch' even if autobuild is disabled. See [#1380](https://github.com/microsoft/vscode-java-debug/pull/1380).
+
+## 0.53.0 - 2023-08-01
+### Added
+- Automatically refresh the CALL STACK view when the attached sources for frames have changed. See [#1370](https://github.com/microsoft/vscode-java-debug/pull/1370).
+
+### Changed
+- Remove marketplace preview flag. See [#1369](https://github.com/microsoft/vscode-java-debug/pull/1369).
+
+## 0.52.0 - 2023-06-30
+### Added
+- Use the setting `java.debug.settings.debugSupportOnDecompiledSource` to enable/disable debugging support on the decompiled source code. This feature requires [Language Support for Java by Red Hat](https://marketplace.visualstudio.com/items?itemName=redhat.java)@1.20.0 or higher. See [#1356](https://github.com/microsoft/vscode-java-debug/pull/1356).
+
+## 0.51.0 - 2023-05-31
+### Fixed
+- NPE when adding lambda breakpoints in reactive projects. See [java-debug#477](https://github.com/microsoft/java-debug/issues/477). Thanks to [Gayan Perera](https://github.com/gayanper) for contribution.
+- Lambda breakpoint on the first line of a method does not work. See [java-debug#488](https://github.com/microsoft/java-debug/issues/488). Thanks to [Gayan Perera](https://github.com/gayanper) for contribution.
+
+## 0.50.0 - 2023-04-26
+### Added
+- Support specifying the exception types you want to break on. See [#1175](https://github.com/microsoft/vscode-java-debug/issues/1175) and [#295](https://github.com/microsoft/vscode-java-debug/issues/295).
+
+## 0.49.1 - 2023-03-28
+### Added
+- Add context menus "Auto/Manual Expand Lazy Variables" to Variables view to auto show 'toString()' value. See [#1316](https://github.com/microsoft/vscode-java-debug/pull/1316).
+
+### Fixed
+- Fix the error 'compareVersions is not a function'. See [#1307](https://github.com/microsoft/vscode-java-debug/pull/1307).
+
+## 0.49.0 - 2023-02-28
+### Added
+- Enable Hot Code Replace when autobuild is disabled. See [#1296](https://github.com/microsoft/vscode-java-debug/pull/1296), [#1302](https://github.com/microsoft/vscode-java-debug/pull/1302).
+
+### Changed
+- Display the running launch config name in progress bar for transparency. See [#1299](https://github.com/microsoft/vscode-java-debug/pull/1299).
+- launch previously launched application if the current file isn't executable. See [#1036](https://github.com/microsoft/vscode-java-debug/issues/1036).
+
+## 0.48.0 - 2023-02-01
+### Changed
+- Reject invalid DAP request. See [java-debug#466](https://github.com/microsoft/java-debug/pull/466).
+
+### Fixed
+- Prioritize lookup the project source code during debugging. See [#1215](https://github.com/microsoft/vscode-java-debug/issues/1215). Thanks to [mozhuanzuojing](https://github.com/mozhuanzuojing) for contribution.
+
+## 0.47.0 - 2022-11-29
+### Changed
+- Optimize the build error report of "Build failed, do you want to continue?". [#1214](https://github.com/microsoft/vscode-java-debug/issues/1214).
+
+### Fixed
+- Use the system encoding to generate the *.argfile. [#1112](https://github.com/microsoft/vscode-java-debug/issues/1112).
+- "shortenCommandLine": "argfile|auto" should include "vmArgs". [#1254](https://github.com/microsoft/vscode-java-debug/issues/1254).
+
+## 0.46.0 - 2022-11-02
+### Added
+- Add "Step Into Target" feature to allow stepping directly into a specific function call when paused on a line. See [#1192](https://github.com/microsoft/vscode-java-debug/issues/1192). Thanks to [Gayan Perera](https://github.com/gayanper) for contribution.
+
+### Changed
+- Exclude **/node_modules/** from .vscode/launch.json searches. See [#1234](https://github.com/microsoft/vscode-java-debug/pull/1234). Thanks to [Brandon Cheng](https://github.com/gluxon) for contribution.
+
+### Fixed
+- Conditional Breakpoint got error code in reply:504. See [#1250](https://github.com/microsoft/vscode-java-debug/issues/1250).
+
+## 0.45.0 - 2022-10-12
+### Added
+- Visualize the inline breakpoint locations. See [#1193](https://github.com/microsoft/vscode-java-debug/issues/1193).
+- Show an extra column cursor when an inline breakpoint is hit. See [#1202](https://github.com/microsoft/vscode-java-debug/issues/1202).
+- Support JEP 425: Virtual Threads (JDK 19). See [#1159](https://github.com/microsoft/vscode-java-debug/issues/1159).
+
+### Changed
+- Enable async jdwp based on network latency for auto mode. See [java-debug#447](https://github.com/microsoft/java-debug/pull/447).
+
+### Fixed
+- NPE when stopping JDT.LS. See [java-debug#448](https://github.com/microsoft/java-debug/issues/448).
+
+## 0.44.0 - 2022-09-01
+### Added
+- **Experimental**: Support processing JDWP commands asynchronously to improve response speed of remote debugging. It's only enabled by default on VS Code Insiders. You can also opt-in by setting `java.debug.settings.jdwp.async`. See [#1208](https://github.com/microsoft/vscode-java-debug/pull/1208) and [java-debug#436](https://github.com/microsoft/java-debug/pull/436).
+- Add support to specify Java executable via the property `javaExec` in launch.json. See [#1198](https://github.com/microsoft/vscode-java-debug/pull/1198). Thanks to [Gayan Perera](https://github.com/gayanper) for contribution.
+- Add support for lambda breakpoints. See [java-debug#427](https://github.com/microsoft/java-debug/pull/427). Thanks to [Gayan Perera](https://github.com/gayanper) for contribution.
+
+## 0.43.0 - 2022-07-27
+### Added
+- Support adding function breakpoints from the editor gutter. [java-debug#426](https://github.com/microsoft/java-debug/pull/426). Thanks to [Gayan Perera](https://github.com/gayanper) for contribution.
+
+### Changed
+- Show target VM exceptions as result in evaluate requests. [java-debug#428](https://github.com/microsoft/java-debug/pull/428). Thanks to [Mathias Fußenegger](https://github.com/mfussenegger) for contribution.
+
+## 0.42.0 - 2022-06-29
+### Added
+- Support function breakpoints, see [#258](https://github.com/microsoft/vscode-java-debug/issues/258). The current version support adding a function breakpoint with the syntax as `FullyQualifiedClassName#methodName` (e.g. `java.util.ArrayList#add`). Thanks to [Gayan Perera](https://github.com/gayanper) for contribution.
+
+### Changed
+- Mark native frames and unavailable methods as subtle. [java-debug#409](https://github.com/microsoft/java-debug/pull/409). Thanks to [Mathias Fußenegger](https://github.com/mfussenegger) for contribution.
+
+### Fixed
+- fix artifactId typo in Troubleshooting.md. [#1180](https://github.com/microsoft/vscode-java-debug/pull/1180). Thanks to [btoo](https://github.com/btoo) for contribution.
+
+## 0.41.0- 2022-06-01
+### Added
+- Provide "Stop Java" button when triggering "Run Java" action. [#1166](https://github.com/microsoft/vscode-java-debug/issues/1166).
+- [API] Support DAP request `processId` and event `processid` to get the exact pid of current running Java process. [java-debug#413](https://github.com/microsoft/java-debug/pull/413).
+
+### Changed
+- Naming Java terminals with different names. [#1164](https://github.com/microsoft/vscode-java-debug/issues/1164).
+- Enable Java terminal link provider on all terminals. [#1168](https://github.com/microsoft/vscode-java-debug/pull/1168).
+- Disable HCR button when running Java without debugging. [#1167](https://github.com/microsoft/vscode-java-debug/pull/1167).
+
+## 0.40.1- 2022-04-15
+### Fixed
+- Update command id to 'java.project.addToSourcePath.command'. [#1152](https://github.com/microsoft/vscode-java-debug/issues/1152).
+
+## 0.40.0 - 2022-03-28
+### Fixed
+- Fix extension version. [#1146](https://github.com/microsoft/vscode-java-debug/pull/1146).
+
+## 0.39.0 - 2022-03-28
+### Added
+- Support lazy loading object values from toString(). [java-debug#401](https://github.com/microsoft/java-debug/pull/401).
+- API - Provide an api to query the processId of the debugging Java process. [java-debug#399](https://github.com/microsoft/java-debug/pull/399).
+
+### Changed
+- Print logpoints to debug console. [#710](https://github.com/microsoft/vscode-java-debug/issues/710). Thanks to [James Clark](https://github.com/sbj42) for contribution.
+
+### Fixed
+- VM launch failure doesn't report a useful error. [java-debug#397](https://github.com/microsoft/java-debug/issues/397). Thanks to [Karl von Randow](https://github.com/karlvr) for contribution.
+- Engineering - Fix problemMatcher patterns for the watch task. [#1137](https://github.com/microsoft/vscode-java-debug/pull/1137). Thanks to [James Clark](https://github.com/sbj42) for contribution.
+
+## 0.38.0 - 2022-01-26
+### Added
+- Thanks for the contribution from [Mu-Tsun Tsai](https://github.com/MuTsunTsai). Add zh-tw locale. [#1087](https://github.com/microsoft/vscode-java-debug/pull/1087).
+
+### Changed
+- Change the inline button to debug icon. [#1108](https://github.com/microsoft/vscode-java-debug/pull/1108).
+
+### Fixed
+- Improve the search performance of resolving main class. [java-debug#395](https://github.com/microsoft/java-debug/pull/395).
+- If mainClass not specified, it will find main classes not belonging to current workspace. [#1098](https://github.com/microsoft/vscode-java-debug/issues/1098).
+- Update CONTRIBUTING docs. [#1105](https://github.com/microsoft/vscode-java-debug/issues/1105).
+
+## 0.37.0 - 2021-11-24
+### Added
+- Troubleshooting Guide for Encoding Issues on Windows. See [Troubleshooting_encoding](https://github.com/microsoft/vscode-java-debug/blob/main/Troubleshooting_encoding.md).
+
+### Fixed
+- Address encoding issues on Windows. [#1077](https://github.com/microsoft/vscode-java-debug/pull/1077).
+- Encoding - launcher.bat could not pass on redirected input into the java program being debugged. [microsoft/vscode-java-pack#756](https://github.com/microsoft/vscode-java-pack/issues/756).
+- Encoding - Launching BAT for UTF-8 fix is incompatible with Security Policies disallowing BAT execution. [#646](https://github.com/microsoft/vscode-java-debug/issues/646).
+- Encoding - Non-ASCII char support for Windows terminals. [#622](https://github.com/microsoft/vscode-java-debug/issues/622).
+- Encoding - [Windows non-ASCII folder] Error: Could not find or load main class. [#623](https://github.com/microsoft/vscode-java-debug/issues/623).
+- Step filter in the settings.json is not working. [#1085](https://github.com/microsoft/vscode-java-debug/issues/1085).
+- Contribution from [
+John Grant](https://github.com/cyrfer): Support multiline values in envFile. [#1061](https://github.com/microsoft/vscode-java-debug/issues/1061).
+- Contribution from [
+Adrien Piquerez](https://github.com/adpi2). Fix NPE when using step filter. [microsoft/java-debug#387](https://github.com/microsoft/java-debug/pull/387).
+- Contribution from [Douglas M. Barcellos](https://github.com/dougmbarcellos). Update telemetry setting declaration in README. [#1084](https://github.com/microsoft/vscode-java-debug/pull/1084).
+
+## 0.36.0 - 2021-09-23
+### Changed
+- Adopt new createStatusBarItem API for id and name properties. [#1020](https://github.com/microsoft/vscode-java-debug/issues/1020).
+
+### Fixed
+- Unicode character in class name will fail to run. [#780](https://github.com/microsoft/vscode-java-debug/issues/780).
+- Launching apps which require both a modulepath and a classpath doesn't work with shortenCommandLine="argfile". [#1047](https://github.com/microsoft/vscode-java-debug/issues/1047).
+- Debugger fails to load variable values due to java.lang.OutOfMemoryError. [#1044](https://github.com/microsoft/vscode-java-debug/issues/1044).
+- Fix privacy in the logger. [PR#1048](https://github.com/microsoft/vscode-java-debug/pull/1048).
+
+## 0.35.0 - 2021-07-28
+### Changed
+- Add link to check detatils while reporting debugging progress. [PR#1034](https://github.com/microsoft/vscode-java-debug/pull/1034).
+
+### Fixed
+- Catch up build errors before running a Java application. [#949](https://github.com/microsoft/vscode-java-debug/issues/949).
+
+## 0.34.0 - 2021-05-26
+### Changed
+- Allow customizing the "classPaths" and "modulePaths" configurations via launch.json. See [#93](https://github.com/microsoft/vscode-java-debug/issues/93), [#980](https://github.com/microsoft/vscode-java-debug/issues/980).
+
+## 0.33.1 - 2021-04-30
+### Fixed
+- HotFix: After upgrade from vscode-java v0.77.0 to v0.78.0 can't debug tests. [#995](https://github.com/microsoft/vscode-java-debug/issues/995).
+
+## 0.33.0 - 2021-04-28
+### Added
+- Support inline values feature. [PR#977](https://github.com/microsoft/vscode-java-debug/pull/977).
+- Show VARIABLES with different data views. [PR#982](https://github.com/microsoft/vscode-java-debug/pull/982).
+- Adopt new APIs from vscode-tas-client. [#974](https://github.com/microsoft/vscode-java-debug/pull/974).
+- Adopt workspaceTrust in package.json. [PR#988](https://github.com/microsoft/vscode-java-debug/pull/988).
+
+### Changed
+- Engineering: Clean up deprecated logs. [PR#987](https://github.com/microsoft/vscode-java-debug/pull/987).
+
+### Fixed
+- Breakpoints inside record methods don't work. [#973](https://github.com/microsoft/vscode-java-debug/issues/973).
+- Support environment variable for port number in launch.json debug configuration. [#962](https://github.com/microsoft/vscode-java-debug/issues/962).
+- Thanks for the contribution from [ZingBlue](https://github.com/ZingBlue): Spelling fix. [#968](https://github.com/microsoft/vscode-java-debug/pull/968).
+
+## 0.32.1 - 2021-03-23
+### Fixed
+- Cannot launch debug session using JDK 16. [#970](https://github.com/microsoft/vscode-java-debug/issues/970).
+
+## 0.32.0 - 2021-03-12
+### Added
+- Adopt TAS client for A/B testing. [PR#959](https://github.com/microsoft/vscode-java-debug/pull/959).
+
+### Changed
+- Update to new product logo. [PR#952](https://github.com/microsoft/vscode-java-debug/pull/952).
+- Adopt new 'run' menu in editor title. [PR#956](https://github.com/microsoft/vscode-java-debug/pull/956),[PR#960](https://github.com/microsoft/vscode-java-debug/pull/960).
+- Engineering - Enable GitHub Actions. [PR#951](https://github.com/microsoft/vscode-java-debug/pull/951).
+
+## 0.31.0 - 2021-02-02
+### Added
+- Support envFile option in launch.json. [#523](https://github.com/microsoft/vscode-java-debug/issues/523).
+
+### Fixed
+- Git bash failed to execute Run/Debug when Windows username have blank space. [#678](https://github.com/microsoft/vscode-java-debug/issues/678).
+- TEMP folder with spaces breaks debugger process. [#822](https://github.com/microsoft/vscode-java-debug/issues/822).
+- The sort of completion list in DEBUG CONSOLE is different from that in editor. [#909](https://github.com/microsoft/vscode-java-debug/issues/909).
+- The program failed to run in terminal if clicking run button several times in succession. [#924](https://github.com/microsoft/vscode-java-debug/issues/924).
+- Fix vulnerabilities. [#935](https://github.com/microsoft/vscode-java-debug/issues/935), [#936](https://github.com/microsoft/vscode-java-debug/issues/936).
+
+## 0.30.0 - 2020-12-16
+### Added
+- Add run button as inline button in Java Project Explorer. [PR#900](https://github.com/microsoft/vscode-java-debug/pull/900).
+- Use progress to hint the current build status whenever you trigger the Run and Debug features. [PR#919](https://github.com/microsoft/vscode-java-debug/pull/919).
+- Thanks for the contribution from [pablojimpas](https://github.com/pablojimpas): Spanish localization support. [PR#904](https://github.com/microsoft/vscode-java-debug/pull/904).
+
+### Changed
+- Make the run buttons in editor toolbar more context-aware. [PR#898](https://github.com/microsoft/vscode-java-debug/pull/898).
+- Update the group name of the Run and Debug menus registered in the Java Project Explorer. [PR#908](https://github.com/microsoft/vscode-java-debug/pull/908).
+- Simplify the name label of the launch configuration. [PR#921](https://github.com/microsoft/vscode-java-debug/pull/921).
+- Debt: Enable more tslint rules. [PR#914](https://github.com/microsoft/vscode-java-debug/pull/914),[PR#918](https://github.com/microsoft/vscode-java-debug/pull/918).
+
+### Fixed
+- Find Java version from release file. [#910](https://github.com/microsoft/vscode-java-debug/issues/910).
+
+## 0.29.0 - 2020-10-16
+### Added
+- Jump to source when clicking the stack trace printed to the terminal. [PR#890](https://github.com/microsoft/vscode-java-debug/pull/890).
+- Contribute `Run` and `Debug` menus to Project Explorer. [#878](https://github.com/microsoft/vscode-java-debug/pull/878).
+- Provide a user setting `java.debug.settings.vmArgs` to set the default VM arguments to launch your program. [#220](https://github.com/microsoft/vscode-java-debug/issues/220),[#876](https://github.com/microsoft/vscode-java-debug/issues/876).
+- Provide a user setting `java.debug.settings.onBuildFailureProceed` to force the debug session to proceed when build fails. [#888](https://github.com/microsoft/vscode-java-debug/issues/888).
+
+### Changed
+- Allow cancelling the outdated codelens job. [PR#881](https://github.com/microsoft/vscode-java-debug/pull/881).
+
+### Fixed
+- Fix the wrong auto-completion result when typing the evaluation expression in DEBUG CONSOLE. [#880](https://github.com/microsoft/vscode-java-debug/issues/880).
+- Fix the error 'UNC path is missing sharename: \\\\java'. [#882](https://github.com/microsoft/vscode-java-debug/issues/882).
+- Use the correct runtime to validate the JVM versions between the debugger and debuggee. [PR#353](https://github.com/microsoft/java-debug/pull/353).
+
+## 0.28.0 - 2020-08-27
+### Added
+- Add run/debug buttons to editor title bar for single file debugging. [#834](https://github.com/microsoft/vscode-java-debug/issues/834).
+- Add user settings `java.debug.settings.jdwp.limitOfVariablesPerJdwpRequest` and `java.debug.settings.jdwp.requestTimeout` to control JDWP request. [#862](https://github.com/microsoft/vscode-java-debug/pull/862),[#863](https://github.com/microsoft/vscode-java-debug/pull/863).
+
+### Changed
+- Reduce the frequency of JDWP requests to improve performance when expanding VARIABLES view. [#347](https://github.com/microsoft/java-debug/pull/347).
+- Migrate the legacy log to the telemetry wrapper. [#866](https://github.com/microsoft/vscode-java-debug/pull/866).
+
+### Fixed
+- Fix Hot Code Replace error "Cannot find any changed classes for hot replace!". [#855](https://github.com/microsoft/vscode-java-debug/issues/855).
+
+## 0.27.1 - 2020-07-21
+### Fixed
+- Hot Code Replace always reports "Cannot find any changed classes for hot replace!". [#850](https://github.com/microsoft/vscode-java-debug/issues/850).
+
+## 0.27.0 - 2020-07-17
+### Added
+- Break on exception for "just my code". [#756](https://github.com/microsoft/vscode-java-debug/issues/756).
+- Support step "just my code". [#628](https://github.com/microsoft/vscode-java-debug/issues/628).
+- Show return value of a method. [#660](https://github.com/microsoft/vscode-java-debug/issues/660).
+- Support "copy value" from Variable viewlet. [#819](https://github.com/microsoft/vscode-java-debug/issues/819).
+- From upstream jdt: support using lambda and reference expressions in debug evaluation. [#281](https://github.com/microsoft/vscode-java-debug/issues/281).
+- From upstream jdt: support evaluating local variables in the lambda body. [#754](https://github.com/microsoft/vscode-java-debug/issues/754).
+
+### Changed
+- Always give UI feedback whenever you click ⚡ button to apply code changes. [#833](https://github.com/microsoft/vscode-java-debug/pull/833).
+- Automatically add -XX:+ShowCodeDetailsInExceptionMessages when launching your program with Java 14. [#797](https://github.com/microsoft/vscode-java-debug/issues/797).
+- Adopt the new resolveVariable API. [#750](https://github.com/microsoft/vscode-java-debug/issues/750).
+- Adopt DebugAdapterDescriptorFactor API. [#751](https://github.com/microsoft/vscode-java-debug/issues/751).
+
+### Fixed
+- Give a response when you trigger debugging in LightWeight mode. [#841](https://github.com/microsoft/vscode-java-debug/issues/841).
+- Failed to get variables. Reason: com.sun.jdi.InvalidStackFrameException. [#767](https://github.com/microsoft/vscode-java-debug/issues/767).
+- Render the source link for stack trace from Java modules. [#824](https://github.com/microsoft/vscode-java-debug/issues/824).
+
+## 0.26.0 - 2020-05-13
+### Added
+- Support picking a Java process to auto attach. [#759](https://github.com/microsoft/vscode-java-debug/issues/759).
+
+### Fixed
+- When running the Gradle application, the test scope is not filtered out. [#715](https://github.com/microsoft/vscode-java-debug/issues/715).
+- Conditional breakpoint fails in the multi thread scenario. [#782](https://github.com/microsoft/vscode-java-debug/issues/782).
+- Show a warning message about the Unsupported JDK error. [#789](https://github.com/microsoft/vscode-java-debug/issues/789).
+- vmArgs in launch.json does not accept an array of strings. [#778](https://github.com/microsoft/vscode-java-debug/issues/778).
+- Activate the extension before execute Java extension commands. [#775](https://github.com/microsoft/vscode-java-debug/pull/775).
+
+### Changed
+- Contribution from [Mathias Fußenegger](https://github.com/mfussenegger): Extend readme with basic low level usage instructions. [java-debug#327](https://github.com/microsoft/java-debug/pull/327).
+
+Thank [Mathias Fußenegger](https://github.com/mfussenegger) for contribution.
+
+## 0.25.1 - 2020-03-06
+### Fixed
+- Fix the Error: Could not find or load main class @x.y.z.argfile. [#769](https://github.com/microsoft/vscode-java-debug/issues/769).
+- Cannot hit breakpoint at the class using Java 13 Text Blocks. [#773](https://github.com/microsoft/vscode-java-debug/issues/773).
+
+## 0.25.0 - 2020-02-20
+### Added
+- Provide context menu to continue/pause all/other threads. [#748](https://github.com/microsoft/vscode-java-debug/pull/748).
+- Contribution from [bhoppeadoy](https://github.com/bhoppeadoy): Add user setting `java.debug.settings.numericPrecision` to set the numeric precision when formatting doubles in "Variables" or "Debug Console" viewlet. [#745](https://github.com/microsoft/vscode-java-debug/issues/745).
+
+### Fixed
+- Use project's Java runtime to launch the application. [#753](https://github.com/microsoft/vscode-java-debug/issues/753).
+- Restart stop but not start the program. [#752](https://github.com/microsoft/vscode-java-debug/issues/752).
+- Contribution from [xiaoyinl](https://github.com/xiaoyinl): Use HTTPS wherever possible. [#732](https://github.com/microsoft/vscode-java-debug/pull/732).
+
+## 0.24.0 - 2019-12-25
+### Added
+- Support breaking when value changes (a.k.a. Data Breakpoints). [#654](https://github.com/microsoft/vscode-java-debug/issues/654).
+
+### Changed
+- Improve "Run Java" experience: `F5` will run the current file without generating launch.json. [#724](https://github.com/microsoft/vscode-java-debug/issues/724).
+
+### Fixed
+- Debug console will hang on Java exception stack trace. [#719](https://github.com/microsoft/vscode-java-debug/issues/719).
+- Debug console won't automatically append `()` if selecting a method in completion list. [#711](https://github.com/microsoft/vscode-java-debug/issues/711), [#691](https://github.com/microsoft/vscode-java-debug/issues/691).
+- Cannot pass `vmArgs` array to Java 13 project. [#703](https://github.com/microsoft/vscode-java-debug/issues/703).
+
+## 0.23.0 - 2019-10-29
+### Added
+- Provide "Fix..." suggestions when "Build failed" occurs during launching the application. [#358](https://github.com/microsoft/vscode-java-debug/issues/358).
+- Prompt to add the folder to source path if the running file isn't on classpath. [#470](https://github.com/microsoft/vscode-java-debug/issues/470).
+- Provide samples for the commonly used debug configuration. See the [doc](https://github.com/microsoft/vscode-java-debug/blob/master/Configuration.md).
+
+### Fixed
+- It's safe to keep running the run/debug codelens if the debug configuration fails to save into the launch.json. [PR#673](https://github.com/microsoft/vscode-java-debug/pull/673).
+- Improve the error handling when running the file via the context "run" or "debug" menu. [PR#679](https://github.com/microsoft/vscode-java-debug/pull/679).
+- Support searching main classes from the workspace invisible project. [PR#305](https://github.com/microsoft/java-debug/pull/305).
+
+### Changed
+- Update troubleshooting doc for class not found error. See the [doc](https://github.com/microsoft/vscode-java-debug/blob/master/Troubleshooting.md#program-error-could-not-find-or-load-main-class-x).
+- Update troubleshooting doc for build failed error. See the [doc](https://github.com/microsoft/vscode-java-debug/blob/master/Troubleshooting.md#build-failed-do-you-want-to-continue).
+
+## 0.22.0 - 2019-09-24
+### Added
+- Show Run/Debug buttons when hover on a main method. [#657](https://github.com/microsoft/vscode-java-debug/issues/657).
+
+### Fixed
+- Debugger just broken with git bash as the default shell on Windows. [#642](https://github.com/microsoft/vscode-java-debug/issues/642).
+- [Mac] Failed to launch debuggee in terminal with TimeoutException. [#637](https://github.com/microsoft/vscode-java-debug/issues/637), [#651](https://github.com/microsoft/vscode-java-debug/issues/651).
+- Pop an error message when click ⚡ HCR button in the Run mode. [PR#665](https://github.com/microsoft/vscode-java-debug/pull/665).
+- Don't escape single quote of the program args. [PR#668](https://github.com/microsoft/vscode-java-debug/pull/668).
+
+## 0.21.0 - 2019-08-26
+### Added
+- Add menu entries to `Run` and `Debug` a Java application when you right click a Java file in file explorer or opened editor. [#626](https://github.com/microsoft/vscode-java-debug/issues/626).
+
+### Changed
+- Remove hard dependency of redhat.java. [PR#617](https://github.com/microsoft/vscode-java-debug/pull/617).
+- Change the default console to integrated terminal. [#605](https://github.com/microsoft/vscode-java-debug/issues/605).
+
+### Fixed
+- Java language server is activated by mistake when debugging a non-Java project. [#238](https://github.com/microsoft/vscode-java-debug/issues/238).
+- [Windows] `integratedTerminal` console does not showing unicode characters. [#524](https://github.com/microsoft/vscode-java-debug/issues/524).
+- Contribution from [pi1024e](https://github.com/pi1024e): Fix UI typos. [PR#630](https://github.com/microsoft/vscode-java-debug/pull/630).
+
+Thank [pi1024e](https://github.com/pi1024e) for contribution.
+
+## 0.20.0 - 2019-07-01
+### Fixed
+- Fix: Adding wrong jar version to the classpath. [#566](https://github.com/microsoft/vscode-java-debug/issues/566).
+- Fix: Adding wrong classpath at runtime for multi modules maven projects. [#584](https://github.com/microsoft/vscode-java-debug/issues/584).
+- Contribution from [tom-shan](https://github.com/tom-shan): Should break earlier when destroying temporary launch file. [PR#280](https://github.com/microsoft/java-debug/pull/280).
+
+Thank [tom-shan](https://github.com/tom-shan) for contribution.
+
+## 0.19.0 - 2019-05-31
+### Added
+- Add a debug toolbar button to apply the changed classes to the running application. [#559](https://github.com/microsoft/vscode-java-debug/issues/559).
+- Show toString() values in Variable window and hover tooltip. [#315](https://github.com/microsoft/vscode-java-debug/issues/315), [#364](https://github.com/microsoft/vscode-java-debug/issues/364).
+- Add a global user setting `java.debug.settings.console` to specify the default console to launch your program. [PR#594](https://github.com/microsoft/vscode-java-debug/pull/594).
+
+### Fixed
+- Fix: The debug toolbar doesn't close after the program running in external terminal exits. [#582](https://github.com/microsoft/vscode-java-debug/issues/582).
+- Fix: Cannot stop the debugging process automatically in attach mode. [java-debug#273](https://github.com/microsoft/java-debug/issues/273).
+
+## 0.18.0 - 2019-04-23
+### Added
+- Enable "Logical Structure" view for Map and Collection variables. [#227](https://github.com/Microsoft/vscode-java-debug/issues/227).
+- Add the source hyperlinks for the stack traces in the Debug Console output. [#490](https://github.com/Microsoft/vscode-java-debug/issues/490), [#506](https://github.com/Microsoft/vscode-java-debug/issues/506).
+- Automatically add `--enable-preview` to vmArgs when necessary. [#553](https://github.com/Microsoft/vscode-java-debug/issues/553).
+
+### Changed
+- Disable `java.debug.settings.showStaticVariables` by default to not show the static fields.
+
+### Fixed
+- Fix: Debug Console does not support autocomplete when a .class file is open. [#535](https://github.com/Microsoft/vscode-java-debug/issues/535).
+
+## 0.17.0 - 2019-03-06
+### Added
+- Popup the exception details via a UI widget when an exception breakpoint is hit. [#522](https://github.com/Microsoft/vscode-java-debug/issues/522).
+
+### Changed
+- Reduce the extension load time by using webpack. [#492](https://github.com/Microsoft/vscode-java-debug/issues/492), [#517](https://github.com/Microsoft/vscode-java-debug/issues/517).
+
+### Fixed
+- Add a new debug configuration `shortenCommandLine` to fix the issue "CreateProcess error=206, The filename or extension is too long". [#110](https://github.com/Microsoft/vscode-java-debug/issues/110).
+
+## 0.16.0 - 2018-12-12
+### Added
+- Provide Chinese localized settings page for Java debugger, including launch.json configuration and user settings. [#472](https://github.com/Microsoft/vscode-java-debug/issues/472), [#477](https://github.com/Microsoft/vscode-java-debug/issues/477).
+- Add new user settings `java.debug.settings.forceBuildBeforeLaunch` to control whether to build the workspace before Run/Debug. [#462](https://github.com/Microsoft/vscode-java-debug/issues/462).
+- F5 will auto launch the current Java file if `mainClass` in launch.json is set to the variable `${file}`. [#431](https://github.com/Microsoft/vscode-java-debug/issues/431)
+
+### Changed
+- Simplify generated launch.json. [#476](https://github.com/Microsoft/vscode-java-debug/issues/476).
+- Remove the emoji before Run/Debug CodeLens. [#475](https://github.com/Microsoft/vscode-java-debug/issues/475).
+- Use `vscode.open` api instead of `opn` library. [#479](https://github.com/Microsoft/vscode-java-debug/issues/479).
+
+### Fixed
+- Fix the main class isn't unique issue. [#420](https://github.com/Microsoft/vscode-java-debug/issues/420).
+
+## 0.15.0 - 2018-11-01
+### Added
+- Contribution from [Thad House](https://github.com/ThadHouse): Add new user settings `java.debug.settings.enableRunDebugCodeLens` to enable/disable Run|Debug Code Lenses on main methods. [#464](https://github.com/Microsoft/vscode-java-debug/issues/464).
+- Contribution from [Julien Russo](https://github.com/Dotpys): Add italian translation for extension configuration. [PR#463](https://github.com/Microsoft/vscode-java-debug/pull/463).
+
+Thank [Thad House](https://github.com/ThadHouse) and [Julien Russo](https://github.com/Dotpys) for contribution.
+
+## 0.14.0 - 2018-10-10
+### Fixed
+- Fix: Code Lenses for Run/Debug links on main methods don't show up immediately. [#438](https://github.com/Microsoft/vscode-java-debug/issues/438).
+- Fix: It throws "ConfigError: 'mymodule/App' is not a valid class name." for java 9 program. [#437](https://github.com/Microsoft/vscode-java-debug/issues/437).
+- Fix: Cannot run from src/test anymore. [#413](https://github.com/Microsoft/vscode-java-debug/issues/413).
+- Fix: It throws InvalidStackFrameException during evaluating on conditional breakpoint. [#369](https://github.com/Microsoft/vscode-java-debug/issues/369).
+- Fix: The launch command for internalConsole is different from integratedTerminal. [#440](https://github.com/Microsoft/vscode-java-debug/issues/440).
+
+## 0.13.0 - 2018-9-19
+### Added
+- Use code lens to run java program in a much simpler way. [#375](https://github.com/Microsoft/vscode-java-debug/issues/375).
+- Make args/vmArgs accept an array. [#389](https://github.com/Microsoft/vscode-java-debug/issues/389).
+- Make mainClass accept variables. [#85](https://github.com/Microsoft/vscode-java-debug/issues/85).
+
+### Fixed
+- Fix: Still include test classes in classpaths when auto resolve maven project. [#378](https://github.com/Microsoft/vscode-java-debug/issues/378).
+- Fix: Duplicate class path during launching. [#370](https://github.com/Microsoft/vscode-java-debug/issues/370).
+- Fix: Update Active Editor oct icon to file instead of clock. [#403](https://github.com/Microsoft/vscode-java-debug/issues/403).
+- Fix: Launching the debuggee with the same JDK as java language server instead of JRE. [#366](https://github.com/Microsoft/vscode-java-debug/issues/366).
+- Fix: Avoid pop up error window many times for logpoints in a loop. [#360](https://github.com/Microsoft/vscode-java-debug/issues/390).
+- Fix: Debug buttons disabled. [#411](https://github.com/Microsoft/vscode-java-debug/issues/411)
+- Fix: StepResponse/ContinueResponse should be sent before StoppedEvent. [java-debug#134](https://github.com/Microsoft/java-debug/issues/134)
+
+## 0.12.2 - 2018-9-6
+### Fixed
+- Fix: Runtime scope class path entries are missing. [#402](https://github.com/Microsoft/vscode-java-debug/issues/402).
+
+## 0.12.1 - 2018-8-31
+### Fixed
+- Fix: `env` config in launch.json not respected. [#393](https://github.com/Microsoft/vscode-java-debug/issues/393).
+
+## 0.12.0 - 2018-8-29
+### Added
+- Start without debugging. See [#351](https://github.com/Microsoft/vscode-java-debug/issues/351).
+- Add the validation to mainClass and projectName before launching. See [#355](https://github.com/Microsoft/vscode-java-debug/issues/355).
+- Add "Learn More" link jumps to the associated troubleshooting paragraph [#360](https://github.com/Microsoft/vscode-java-debug/issues/360).
+
+### Changed
+- Put recently used main class in the top [#350](https://github.com/Microsoft/vscode-java-debug/issues/350).
+- Enable evaluation for hovers [#297](https://github.com/Microsoft/vscode-java-debug/issues/297).
+- Distinguish user errors and system errors [#288](https://github.com/Microsoft/vscode-java-debug/issues/288).
+
+### Fixed
+- Fix: vulnerabilities issue [PR#356](https://github.com/Microsoft/vscode-java-debug/pull/356).
+- Fix: NPE for CompletionsProvider [PR#206](https://github.com/Microsoft/java-debug/pull/206).
+- Fix: Debugger slow when watching variables [#305](https://github.com/Microsoft/vscode-java-debug/issues/305).
+- Fix: Should not include test classes in classpath [#111](https://github.com/Microsoft/vscode-java-debug/issues/111).
+
+## 0.11.0 - 2018-8-2
+### Added
+- Add a troubleshooting page for common errors. See [the troubleshooting guide](https://github.com/Microsoft/vscode-java-debug/blob/master/Troubleshooting.md).
+- Build and publish the Java Debug Server plugin as p2 artifacts. See [PR#191](https://github.com/Microsoft/java-debug/pull/191), [PR#192](https://github.com/Microsoft/java-debug/pull/192).
+
+### Changed
+- Auto select Java Debugger for .java file. See [PR#329](https://github.com/Microsoft/vscode-java-debug/pull/329).
+- Improve the *launch.json* auto-generation UX. See [PR#342](https://github.com/Microsoft/vscode-java-debug/pull/342).
+- Improve the logger coverage for the error response. See [PR#190](https://github.com/Microsoft/java-debug/pull/190).
+
+### Fixed
+- Fix the attach error in JDK 10. See [PR#187](https://github.com/Microsoft/java-debug/pull/187).
+- Fix the Java Debug Server plugin build error in JDK 10. See [PR#194](https://github.com/Microsoft/java-debug/pull/194).
+
+## 0.10.0 - 2018-6-27
+### Added
+- Add support for Logpoint. The minimum compatible VS Code version is 1.22. See the feature request [#272](https://github.com/Microsoft/vscode-java-debug/issues/272)
+
+### Fixed
+- Contribution from [LunarArcanus](https://github.com/LunarArcanus): Fix the grammar issue in README. See [PR#306](https://github.com/Microsoft/vscode-java-debug/pull/306).
+- Fix the project's build errors in JDK 9/10. See [PR#178](https://github.com/Microsoft/java-debug/pull/178)
+
+## 0.9.0 - 2018-4-26
+### Added
+- Support auto-complete feature in debug console view. See the feature request [#237](https://github.com/Microsoft/vscode-java-debug/issues/237)
+
+### Fixed
+- Fix the ObjectCollectedException when enabling ExceptionBreakpoint. See [Issue #182](https://github.com/Microsoft/vscode-java-debug/issues/182)
+- Fix the [issue #277](https://github.com/Microsoft/vscode-java-debug/issues/277) that the debugger doesn't stop on caught/uncaught exceptions. See [PR #172](https://github.com/Microsoft/java-debug/pull/172)
+- Fix the [issue #273](https://github.com/Microsoft/vscode-java-debug/issues/273) that Chinese characters directory will cause messy code during stack trace's source looking up. See [PR #170](https://github.com/Microsoft/java-debug/pull/170)
+
+
+## 0.8.0 - 2018-4-3
+### Added
+- Support [restart frame](https://github.com/Microsoft/vscode-java-debug/issues/235). See [PR#160](https://github.com/Microsoft/java-debug/pull/160)
+
+### Changed
+- Enable hot code replace by default. See [PR#263](https://github.com/Microsoft/vscode-java-debug/pull/263)
+- Wait for building successfully before launch debug session. See [PR#257](https://github.com/Microsoft/vscode-java-debug/pull/257)
+- Automatically detect projectName when only one main class or project available. See [PR#164](https://github.com/Microsoft/java-debug/pull/164)
+
+
+## 0.7.0 - 2018-3-15
+### Added
+- Support [conditional breakpoints](https://github.com/Microsoft/vscode-java-debug/issues/118). See [PR#153](https://github.com/Microsoft/java-debug/pull/153), [PR#154](https://github.com/Microsoft/java-debug/pull/154), [PR#156](https://github.com/Microsoft/java-debug/pull/156)
+- Support prompting user for program arguments. See [PR#245](https://github.com/Microsoft/vscode-java-debug/pull/245)
+
+### Changed
+- Fix the unsupported breakpoint at method entry/exit issue. See [PR#129](https://github.com/Microsoft/java-debug/pull/129)
+- Fix the issue when the projectName is not specified, the expression evaluation doesn't work. See [PR#156](https://github.com/Microsoft/java-debug/pull/156)
+- Fix VMDisconnectionException in HCR. See [PR#150](https://github.com/Microsoft/java-debug/pull/150)
+
+
+## 0.6.0 - 2018-2-1
+### Added
+- Support hot code replace. See [PR#225](https://github.com/Microsoft/vscode-java-debug/pull/225)
+
+## 0.5.0 - 2017-12-20
+### Added
+- Support step filters when stepping. See [PR#155](https://github.com/Microsoft/vscode-java-debug/pull/155)
+- Support expression evaluation. See [PR#126](https://github.com/Microsoft/vscode-java-debug/pull/126), [PR#131](https://github.com/Microsoft/java-debug/pull/131)
+- Publish the binaries to the maven central repository. See [PR#132](https://github.com/Microsoft/java-debug/pull/132)
+
+### Changed
+- Adopt new VSCode 1.19.0 debug activation events. See [PR#196](https://github.com/Microsoft/vscode-java-debug/pull/196)
+- Looking up the stack frame's associated source file from source containers to improve searching perf. See [PR#127](https://github.com/Microsoft/java-debug/pull/127)
+
+## 0.4.0 - 2017-11-30
+### Added
+- Add `stopOnEntry` and `console` options for launch.json. See [PR#177](https://github.com/Microsoft/vscode-java-debug/pull/177)
+- Support console input by launching the program in the integrated/external terminal. See [PR#122](https://github.com/Microsoft/java-debug/pull/122)
+- Add debugging settings: `java.debug.settings.showHex`, `java.debug.settings.showStaticVariables`, `java.debug.settings.showQualifiedNames`, `java.debug.settings.maxStringLength`. See [README](https://github.com/Microsoft/vscode-java-debug/README.md) for details
+- Support project scope when resolving multiple-root project. See [PR#174](https://github.com/Microsoft/vscode-java-debug/pull/174)
+
+### Fixed
+- Fix single file build issue. See [Issue#167](https://github.com/Microsoft/vscode-java-debug/issues/167)
+- Fix perf issue when debugging with "stopOnEntry". See [PR#115](https://github.com/Microsoft/java-debug/pull/115)
## 0.3.1 - 2017-11-17
### Fixed
@@ -52,3 +661,4 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Callstacks
- Threads
- Debug console
+
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 00000000..cae7a2a0
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,64 @@
+# Contributing to Java Debugger
+
+## Build and Debug
+
+### Getting the source
+This debugger is written in [TypeScript](https://github.com/Microsoft/TypeScript), and it depends on a [Java Debug Server](https://github.com/Microsoft/java-debug) written in Java.
+- Suggest to create a new folder first.
+ ```bash
+ mkdir javaDebugger
+ cd javaDebugger
+ ```
+- Check out source code for the extension.
+ ```bash
+ git clone https://github.com/Microsoft/vscode-java-debug.git
+ ```
+- Check out source code for the debug server.
+ ```bash
+ git clone https://github.com/Microsoft/java-debug.git
+ ```
+Now the folder structure looks like following:
+```bash
+javaDebugger/
+├── java-debug
+└── vscode-java-debug
+```
+
+### Prerequisites
+- [JDK](http://www.oracle.com/technetwork/java/javase/downloads/index.html), (version 11 or later)
+- [VS Code](https://code.visualstudio.com/), (version 1.44.0 or later)
+- [Node.JS](https://nodejs.org/en/), (>= 12.8.1)
+- [Language Support for Java by Red Hat](https://marketplace.visualstudio.com/items?itemName=redhat.java), (version 0.60.0 or later)
+
+Install all the dependencies using `npm` (supposed to be installed together with [Node.JS](https://nodejs.org/en/)).
+```bash
+cd vscode-java-debug
+npm install
+```
+
+### Build and Run
+#### Build the Debug Server
+For convenience, there is a build script `buildJdtlsExt.js` defined in `scripts/build`. It builds the Java Debug Server and then copies the .jar file into folder `vscode-java-debug/server`.
+```bash
+npm run build-server
+```
+**NOTE**: If you didn't follow the steps to check out [vscode-java-debug](https://github.com/Microsoft/vscode-java-debug) and [java-debug](https://github.com/Microsoft/java-debug) in the same folder, please specify a correct `server_dir` in your [buildJdtlsExt.js](https://github.com/Microsoft/vscode-java-debug/blob/master/scripts/build/buildJdtlsExt.js#L8).
+
+#### Debug the Extension
+Open folder `vscode-java-debug` in VS Code, or simply execute following commands if you have `code` in your system PATH.
+```bash
+cd vscode-java-debug
+code .
+```
+Press F5 to start debugging the extension, it will create a new window as the extension host.
+
+#### Debug the Debug Server
+When you are debugging the extension, it is able to debug the Java process with local port `1044`. To remote debug the server, you can attach a Java debugger to `localhost:1044` using an IDE (Eclipse, IntelliJ IDEA, etc) or the Java Debugger for VS Code itself.
+
+Since we have checked in a valid [launch.json](https://github.com/Microsoft/java-debug/blob/master/.vscode/launch.json) to the repository, it would be easy to use the Java Debugger for VS Code itself to debug the server.
+- Open folder `java-debug` in a new window in VS Code.
+- Press F5 to attach.
+
+## Pull Requests
+Before we can accept a pull request from you, you'll need to sign a [Contributor License Agreement (CLA)](https://github.com/Microsoft/vscode/wiki/Contributor-License-Agreement). It is an automated process and you only need to do it once.
+To enable us to quickly review and accept your pull requests, always create one pull request per issue and [link the issue in the pull request](https://github.com/blog/957-introducing-issue-mentions).
diff --git a/Configuration.md b/Configuration.md
new file mode 100644
index 00000000..12e07c21
--- /dev/null
+++ b/Configuration.md
@@ -0,0 +1,411 @@
+# Java Debug Configuration
+
+## Table of Contents
+* [Auto generate the launch.json](#auto-generate-the-launchjson)
+* [Modify the launch.json](#modify-the-launchjson)
+ * [Main](#main)
+ * mainClass
+ * projectName
+ * [Arguments](#arguments)
+ * args
+ * vmArgs
+ * [Environment](#environment)
+ * console
+ * env
+ * [Don't step into the specified classes or methods](#dont-step-into-the-specified-classes-or-methods)
+ * stepFilters
+ * [Attach to a debuggee](#attach-to-a-debuggee)
+ * hostName
+ * port
+ * [Attach to mvn task](#attach-to-mvn-task)
+ * [Attach to embedded maven tomcat server](#attach-to-embedded-maven-tomcat-server)
+ * [Use javac as the builder and attach to java process](#use-javac-as-the-builder-and-attach-to-java-process)
+* [Modify the settings.json (User Setting)](#modify-the-settingsjson-user-setting)
+ * java.debug.settings.console
+ * java.debug.settings.forceBuildBeforeLaunch
+ * java.debug.settings.onBuildFailureProceed
+ * java.debug.settings.hotCodeReplace
+ * java.debug.settings.enableRunDebugCodeLens
+* [FAQ](#faq)
+
+
+The debugger provides two kinds of configuration: *launch.json* and *settings.json* (User Settings), see the [README](https://github.com/Microsoft/vscode-java-debug#options) for the supported configuration list. launch.json is used to control the configuration per debug session, and the user setting is shared by the whole workspace or VS Code.
+
+## Auto generate the launch.json
+When you run the program via `Run|Debug` CodeLens or `Run`/`Debug` context menu, the debugger automatically generates the launching configuration for you.
+
+
+## Modify the launch.json
+If you don't see `.vscode/launch.json` in your VS Code window, you can go to "Run and Debug" viewlet to create an initial launch.json.
+
+
+On the other hand, the debugger provides multiple configuration templates to help you to easily add a new configuration. When you type `"java"` or `""` in launch.json, it will trigger auto-completion suggestions.
+
+
+In case you want to manually edit the configuration, below are the explanation and samples about the common debug configurations.
+### Main
+* `mainClass` - mainClass is used to define your program entry, and it's the most important configuration. The debugger provides three options to help you configure this key, see the samples below.
+ * `"mainClass": ""`
+ If you have no idea about what to set here, just leave it empty. The debugger will search all possible main classes from the workspace, then prompt you the list to choose for launch.
+
+
+ * `"mainClass": "${file}"`
+ If you have multiple main Java files, use this to auto switch to your current focus program. The debugger will resolve the main class from current active Java file, and set it as the launching main class.
+
+
+ * `"mainClass": "com.microsoft.app.myApp"`
+ The fully qualified class name, generally it's filled by the debugger's auto generation.
+
+
+* `projectName` - The preferred project in which the debugger searches for classes. It's required for the evaluation feature. Most of the time, the debugger will auto generate the configuration for you. In case you want to manually configure it, here are the rules.
+ * When you open a maven project, the project name is the `artifactId`.
+ * When you open a gradle project, the project name is the `baseName` or the root folder name.
+ * When you open other Java files, leave the launch.json empty and allow the debugger auto generates the project name for you.
+
+ > Pro Tip: The easiest way to get the project name is to install [Java Dependency Viewer](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-dependency) extension, the top node in the JAVA DEPENDENCIES view is your project name.
+
+
+### Arguments
+* `args` - Program arguments which are used to pass application configuration to your program, and they are accessible via "args" String array parameter in your main method `public static void main(String[] args)`. It accepts three kinds of value, see the samples below.
+ * `"args": "arg0 arg1"`
+ Space separated String value.
+ 
+
+ * `"args": ["arg0", "arg1"]`
+ An array of String.
+ * `"args": "${command:SpecifyProgramArgs}"`
+ The debugger will prompt you with an input box to type the args value before launching the program. This is convenient when you have a program running against multiple data set.
+ 
+
+* `vmArgs` - VM arguments are used to configure JVM options and platform properties. Most of these arguments have a prefix (-D, -X, -XX). For example, *-Xms256m* arguments defines the initial Java heap size to 256MB. And you can also use *-DpropertyName=propertyValue* to configure system properties for your program. These properties are read via API *System.getProperty(propertyName)*. It accepts a String or an array of String, see the samples below.
+ * `"vmArgs": "-Xms256m -Xmx1g -Dserver=production"`
+ Space separated String value.
+ * `"vmArgs": ["-Xms256m", "-Xmx1g", "-Dserver=production"]`
+ An array of String.
+
+### Environment
+- `console` - The specified console to launch the current program. Current default value is `integratedTerminal`. You could customize it via the global user setting `java.debug.settings.console` for the whole workspace, or `console` in launch.json for each debug session. The `console` option in launch.json (if provided) takes precedence over `java.debug.settings.console` in user settings.
+ * `"console": "internalConsole"`
+ VS Code debug console (input stream not supported). If you're developing backend application, `internalConsole` is recommended.
+ 
+
+ * `"console": "integratedTerminal"`
+ VS Code integrated terminal. If you're developing console application with io input requirements, you must use the terminal to accept user input. For example, use *Scanner* class for user input.
+ 
+
+ * `"console": "externalTerminal"`
+ External terminal that can be configured in user settings. The user scenario is same as integrated terminal. The difference is opening an external terminal window to run your program.
+ 
+
+- `env` - The extra environment variables for the program. It's accessible via `System.getenv(key)`. It accepts key-value pairs.
+ ```json
+ {
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "type": "java",
+ "name": "Launch Hello",
+ "request": "launch",
+ "env": {
+ "HOST": "127.0.0.1",
+ "PORT": 8080
+ }
+ }
+ ]
+ }
+ ```
+
+- `envFile` - Absolute path to a file containing environment variable definitions. Multiple files can be specified by providing an array of absolute paths
+ ```json
+ {
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "type": "java",
+ "name": "Launch Hello",
+ "request": "launch",
+ "envFile": "${workspaceFolder}/.env"
+ }
+ ]
+ }
+ ```
+
+### Don't step into the specified classes or methods
+
+- `stepFilters` - Skip the specified classes or methods you don't want to step into. Class names should be fully qualified. Wildcard is supported.
+ - Skip the class loader.
+ ```json
+ {
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "type": "java",
+ "name": "Launch Hello",
+ "request": "launch",
+ "stepFilters": {
+ "skipClasses": [
+ "java.lang.ClassLoader",
+ ]
+ }
+ }
+ ]
+ }
+ ```
+ 
+
+ - Skip the JDK classes.
+ ```json
+ {
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "type": "java",
+ "name": "Launch Hello",
+ "request": "launch",
+ "stepFilters": {
+ "skipClasses": [
+ "$JDK"
+ ]
+ }
+ }
+ ]
+ }
+ ```
+ 
+
+ - Skip the constructors and the synthetic methods.
+ ```json
+ {
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "type": "java",
+ "name": "Launch Hello",
+ "request": "launch",
+ "stepFilters": {
+ "skipSynthetics": true,
+ "skipStaticInitializers": true,
+ "skipConstructors": true
+ }
+ }
+ ]
+ }
+ ```
+ 
+
+### Attach to a debuggee
+- `hostName` - The host name or ip address of the debuggee you want to attach.
+- `port` - The port of the debuggee you want to attach.
+
+Before attaching to a debuggee, your debuggee program must be started with debug mode. The standard command line for debug mode is like `java -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005 -cp bin MyApp`, and then the debug port of your debuggee is *5005*.
+```json
+{
+ "type": "java",
+ "name": "Debug (Attach)",
+ "request": "attach",
+ "hostName": "localhost",
+ "port": 5005
+}
+```
+
+In some cases, you may want to start your program with the external builder and launcher, then you can configure these jobs in [tasks.json](https://code.visualstudio.com/docs/editor/tasks) and attach to it. For example, launching springboot application via mvn command, and then attach a debugger.
+#### Attach to mvn task
+1) Configure your command in .vscode/tasks.json - The mvn task is a background task, you should use *problemMatcher* filter to tell VS Code it's ready.
+ ```json
+ {
+ "label": "mvnDebug",
+ "type": "shell",
+ "command": "mvn spring-boot:run -Dspring-boot.run.jvmArguments=\"-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005\"",
+ "isBackground": true,
+ "problemMatcher": [{
+ "pattern": [{
+ "regexp": "\\b\\B",
+ "file": 1,
+ "location": 2,
+ "message": 3
+ }],
+ "background": {
+ "activeOnStart": true,
+ "beginsPattern": "^.*Attaching agents:.*",
+ "endsPattern": "^.*Listening for transport dt_socket at address.*"
+ }
+ }]
+ }
+ ```
+2) Configure `preLaunchTask` and the debug port in .vscode/launch.json.
+ ```json
+ {
+ "type": "java",
+ "name": "Debug (Attach)",
+ "request": "attach",
+ "hostName": "localhost",
+ "port": 5005,
+ "preLaunchTask": "mvnDebug"
+ }
+ ```
+3) F5 will launch the mvn task, and attach the debugger. See the demo.
+
+
+#### Attach to embedded maven tomcat server
+ - pom.xml sample for embedded tomcat server.
+ ```xml
+ ...
+
+ org.apache.tomcat.maven
+ tomcat7-maven-plugin
+ 2.2
+
+ ...
+ ```
+ - The steps to attach to the embedded maven tomcat server.
+ 1) Use .vscode/tasks.json to configure *run-tomcat* and *stop-tomcat* tasks.
+ ```json
+ {
+ "version": "2.0.0",
+ "tasks": [
+ {
+ "label": "run-tomcat",
+ "type": "shell",
+ "command": "MAVEN_OPTS=\"$MAVEN_OPTS -agentlib:jdwp=transport=dt_socket,address=5005,server=y,suspend=n\" ./mvnw tomcat7:run",
+ "group": "build",
+ "isBackground": true,
+ "problemMatcher": [{
+ "pattern": [{
+ "regexp": "\\b\\B",
+ "file": 1,
+ "location": 2,
+ "message": 3
+ }],
+ "background": {
+ "activeOnStart": true,
+ "beginsPattern": "^.*Listening for",
+ "endsPattern": "^.*transport dt_socket at address.*"
+ }
+ }]
+ },
+ {
+ "label": "stop-tomcat",
+ "type": "shell",
+ "command": "echo ${input:terminate}}",
+ "problemMatcher": []
+ }
+ ],
+ "inputs": [
+ {
+ "id": "terminate",
+ "type": "command",
+ "command": "workbench.action.tasks.terminate",
+ "args": "run-tomcat"
+ }
+ ]
+ }
+ ```
+ 2) Use .vscode/launch.json to configure the attach configuration. Use `preLaunchTask` to run tomcat before the attach, and `postDebugTask` to stop tomcat after the debug ends.
+ ```json
+ {
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "type": "java",
+ "name": "Debug (Attach)",
+ "request": "attach",
+ "hostName": "localhost",
+ "port": 5005,
+ "preLaunchTask": "run-tomcat",
+ "postDebugTask": "stop-tomcat"
+ }
+ ]
+ }
+ ```
+ 3) F5 will auto start the tomcat server and attach the debugger. The demo below will show how to debug spring mvc in tomcat.
+ 
+
+ > If you want to try to debug your Java webapps in a standalone tomcat server, please try VS Code [Tomcat for Java](https://marketplace.visualstudio.com/items?itemName=adashen.vscode-tomcat) extension.
+
+ > If you want to try to debug embedded tomcat server with gradle plugin, see the [gradle sample](https://github.com/microsoft/vscode-java-debug/issues/140#issuecomment-343656398).
+
+#### Use javac as the builder and attach to java process
+1) Configure the javac builder and java runner jobs in .vscode/tasks.json.
+ ```json
+ {
+ "version": "2.0.0",
+ "tasks": [
+ {
+ "label": "build",
+ "type": "shell",
+ "command": "javac -g -sourcepath ./**/*.java -d ./bin"
+ },
+ {
+ "label": "debug",
+ "dependsOn": "build",
+ "type": "shell",
+ "command": "java -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005 -cp bin app.SimpleCalc",
+ "isBackground": true,
+ "problemMatcher": [{
+ "pattern": [{
+ "regexp": "\\b\\B",
+ "file": 1,
+ "location": 2,
+ "message": 3
+ }],
+ "background": {
+ "activeOnStart": true,
+ "beginsPattern": "^.*Listening for",
+ "endsPattern": "^.*transport dt_socket at address.*"
+ }
+ }]
+ }
+ ]
+ }
+ ```
+2) Configure `preLaunchTask` and the debug port in .vscode/launch.json.
+ ```json
+ {
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "type": "java",
+ "name": "Debug (Attach)",
+ "request": "attach",
+ "hostName": "localhost",
+ "port": 5005,
+ "preLaunchTask": "debug"
+ }
+ ]
+ }
+ ```
+3) F5 will run the tasks and attach the debugger. See the demo.
+
+
+## Modify the settings.json (User Setting)
+- `java.debug.settings.console` - The specified console to launch Java program, defaults to `integratedTerminal`. If you want to customize the console for a specific debug session, please use `console` option in launch.json instead.
+ 
+
+- `java.debug.settings.forceBuildBeforeLaunch` - Force building the workspace before launching java program, defaults to `true`. Sometimes you may be bothered with the message *"Build failed, do you want to continue?"*, you could disable this setting to suppress the message.
+
+- `java.debug.settings.onBuildFailureProceed` - Sometimes you may be bothered with the message *"Build failed, do you want to continue?"*, you could use this setting to suppress the message and proceed.
+
+- `java.debug.settings.hotCodeReplace` - Reload the changed Java classes during debugging, defaults to `manual`. It supports `manual`, `auto`, `never`.
+ - `manual` - Click the toolbar to apply the changes.
+ 
+ - `auto` - Automatically apply the changes after saved.
+ - `never` - Never apply the changes.
+
+- `java.debug.settings.enableRunDebugCodeLens` - Enable the code lens provider for the *Run* and *Debug* buttons over main entry points, defaults to `true`.
+ - `true` - Show the code lens.
+ 
+ - `false` - Show the Run/Debug link in the hover.
+ 
+
+## FAQ
+### 1. No way to take input.
+If you are using *Scanner(System.in)* to get the user input, you need change the user setting `java.debug.settings.console` to `integratedTerminal` or `externalTerminal`.
+
+### 2. Code output is not in the DEBUG CONSOLE panel but Terminal.
+By default, the debugger uses the terminal to launch your program for better accepting user input. And you will see the original command line is displayed at the top of the terminal. If you want a cleaner console to show your code output, you could try to change the user setting `java.debug.settings.console` to `internalConsole`. Please notice that the internal console (VS Code built-in DEBUG CONSOLE) doesn't support user input.
+
+### 3. The classpath changed when using terminal.
+In order to avoid the command line being too long, the debugger will shorten your classpath into classpath.jar (for JDK 8 only) or argsfile (for JDK 9 and above) by default. If your program need read the original classpath value (for example, *System.getProperty("java.class.path")*), you could try to change the console to `internalConsole`, or use a higher JDK (9 and above) to launch your program.
+
+### 4. Failed to launch debuggee in terminal with TransportTimeoutException.
+When launching failed in terminal, then you could try to change the user setting `java.debug.settings.console` to `internalConsole`.
diff --git a/README.md b/README.md
index 649dff09..54e122f1 100644
--- a/README.md
+++ b/README.md
@@ -1,13 +1,13 @@
# Debugger for Java
[](https://gitter.im/Microsoft/vscode-java-debug)
-[](https://travis-ci.org/Microsoft/vscode-java-debug)
+[](https://github.com/microsoft/vscode-java-debug/actions/workflows/build.yml?query=branch%3Amain)
## Overview
-A lightweight Java Debugger based on [Java Debug Server](https://github.com/Microsoft/java-debug) which extends the [Language Support for Java by Red Hat](https://marketplace.visualstudio.com/items?itemName=redhat.java). It allows users debugging Java code using Visual Studio Code (VS Code). Here's a list of features:
+A lightweight Java Debugger based on [Java Debug Server](https://github.com/Microsoft/java-debug) which extends the [Language Support for Java by Red Hat](https://marketplace.visualstudio.com/items?itemName=redhat.java). It allows users to debug Java code using Visual Studio Code (VS Code). Here's a list of features:
- Launch/Attach
-- Breakpoints
+- Breakpoints/Conditional Breakpoints/Logpoints
- Exceptions
- Pause & Continue
- Step In/Out/Over
@@ -15,10 +15,12 @@ A lightweight Java Debugger based on [Java Debug Server](https://github.com/Micr
- Callstacks
- Threads
- Debug console
+- Evaluation
+- Hot Code Replace
## Requirements
- JDK (version 1.8.0 or later)
-- VS Code (version 1.17.0 or later)
+- VS Code (version 1.19.0 or later)
- [Language Support for Java by Red Hat](https://marketplace.visualstudio.com/items?itemName=redhat.java) (version 0.14.0 or later)
## Install
@@ -33,12 +35,9 @@ ext install vscode-java-debug
## Use
- Launch VS Code
-- Open a Java project (Maven/Gradle/Eclipse)
+- Open a Java project (Maven/Gradle/Eclipse/Single Java file)
- Open a Java file to activate the extensions
-- Add debug configurations and edit launch.json
- - To launch: specify `mainClass`
- - To attach: specify `hostName` and `port`
-- Press F5
+- Press `F5`
Please also check the documentation of [Language Support for Java by Red Hat](https://marketplace.visualstudio.com/items?itemName=redhat.java) if you have trouble setting up your project.
@@ -46,38 +45,136 @@ Please also check the documentation of [Language Support for Java by Red Hat](ht
### Launch
-- `mainClass` (required) - The main class of the program (fully qualified name, e.g. [mymodule/]com.xyz.MainClass).
+- `mainClass` - The fully qualified name of the class containing the main method. If not specified, the debugger automatically resolves the possible main class from current project.
+ - `${file}` - Current Java file.
+ - `com.mypackage.Main` - The fully qualified class name.
+ - `com.java9.mymodule/com.mypackage.Main` - The fully qualified module name and class name.
+ - `/path/to/Main.java` - The file path of the main class.
- `args` - The command line arguments passed to the program.
+ - `"${command:SpecifyProgramArgs}"` - Prompt user for program arguments.
+ - A space-separated string or an array of string.
- `sourcePaths` - The extra source directories of the program. The debugger looks for source code from project settings by default. This option allows the debugger to look for source code in extra directories.
-- `modulePaths` - The modulepaths for launching the JVM. If not specified, the debugger will automatically resolve from current project.
-- `classPaths` - The classpaths for launching the JVM. If not specified, the debugger will automatically resolve from current project.
-- `encoding` - The `file.encoding` setting for the JVM. If not specified, 'UTF-8' will be used. Possible values can be found in http://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html.
-- `vmArgs` - The extra options and system properties for the JVM (e.g. -Xms\ -Xmx\ -D\=\).
-- `projectName` - The preferred project in which the debugger searches for classes. There could be duplicated class names in different projects. This setting also works when the debugger looks for the specified main class when launching a program.
-- `cwd` - The working directory of the program.
+- `modulePaths` - The modulepaths for launching the JVM. If not specified, the debugger will automatically resolve from current project. If multiple values are specified, the debugger will merge them together.
+ - `$Auto` - Automatically resolve the modulepaths of current project.
+ - `$Runtime` - The modulepaths within 'runtime' scope of current project.
+ - `$Test` - The modulepaths within 'test' scope of current project.
+ - `!/path/to/exclude` - Exclude the specified path from modulepaths.
+ - `/path/to/append` - Append the specified path to the modulepaths.
+- `classPaths` - The classpaths for launching the JVM. If not specified, the debugger will automatically resolve from current project. If multiple values are specified, the debugger will merge them together.
+ - `$Auto` - Automatically resolve the classpaths of current project.
+ - `$Runtime` - The classpaths within 'runtime' scope of current project.
+ - `$Test` - The classpaths within 'test' scope of current project.
+ - `!/path/to/exclude` - Exclude the specified path from classpaths.
+ - `/path/to/append` - Append the specified path to the classpaths.
+- `encoding` - The `file.encoding` setting for the JVM. Possible values can be found in https://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html.
+- `vmArgs` - The extra options and system properties for the JVM (e.g. -Xms\ -Xmx\ -D\=\), it accepts a string or an array of string.
+- `projectName` - The preferred project in which the debugger searches for classes. There could be duplicated class names in different projects. This setting also works when the debugger looks for the specified main class when launching a program. It is required when the workspace has multiple java projects, otherwise the expression evaluation and conditional breakpoint may not work.
+- `cwd` - The working directory of the program. Defaults to `${workspaceFolder}`.
- `env` - The extra environment variables for the program.
+- `envFile` - Absolute path to a file containing environment variable definitions. Multiple files can be specified by providing an array of absolute paths
+- `stopOnEntry` - Automatically pause the program after launching.
+- `console` - The specified console to launch the program. If not specified, use the console specified by the `java.debug.settings.console` user setting.
+ - `internalConsole` - VS Code debug console (input stream not supported).
+ - `integratedTerminal` - VS Code integrated terminal.
+ - `externalTerminal` - External terminal that can be configured in user settings.
+- `shortenCommandLine` - When the project has long classpath or big VM arguments, the command line to launch the program may exceed the maximum command line string limitation allowed by the OS. This configuration item provides multiple approaches to shorten the command line. Defaults to `auto`.
+ - `none` - Launch the program with the standard command line 'java [options] classname [args]'.
+ - `jarmanifest` - Generate the classpath parameters to a temporary classpath.jar file, and launch the program with the command line 'java -cp classpath.jar classname [args]'.
+ - `argfile` - Generate the classpath parameters to a temporary argument file, and launch the program with the command line 'java @argfile [args]'. This value only applies to Java 9 and higher.
+ - `auto` - Automatically detect the command line length and determine whether to shorten the command line via an appropriate approach.
+- `stepFilters` - Skip specified classes or methods when stepping.
+ - `classNameFilters` - [**Deprecated** - replaced by `skipClasses`] Skip the specified classes when stepping. Class names should be fully qualified. Wildcard is supported.
+ - `skipClasses` - Skip the specified classes when stepping.
+ - `$JDK` - Skip the JDK classes from the default system bootstrap classpath, such as rt.jar, jrt-fs.jar.
+ - `$Libraries` - Skip the classes from application libraries, such as Maven, Gradle dependencies.
+ - `java.*` - Skip the specified classes. Wildcard is supported.
+ - `java.lang.ClassLoader` - Skip the classloaders.
+ - `skipSynthetics` - Skip synthetic methods when stepping.
+ - `skipStaticInitializers` - Skip static initializer methods when stepping.
+ - `skipConstructors` - Skip constructor methods when stepping.
+- `javaExec` - The path to java executable to use. By default, the project JDK's java executable is used.
### Attach
-- `hostName` (required) - The host name or IP address of remote debuggee.
-- `port` (required) - The debug port of remote debuggee.
+- `hostName` (required, unless using `processId`) - The host name or IP address of remote debuggee.
+- `port` (required, unless using `processId`) - The debug port of remote debuggee.
+- `processId` - Use process picker to select a process to attach, or Process ID as integer.
+ - `${command:PickJavaProcess}` - Use process picker to select a process to attach.
+ - an integer pid - Attach to the specified local process.
- `timeout` - Timeout value before reconnecting, in milliseconds (default to 30000ms).
- `sourcePaths` - The extra source directories of the program. The debugger looks for source code from project settings by default. This option allows the debugger to look for source code in extra directories.
-- `projectName` - The preferred project in which the debugger searches for classes. There could be duplicated class names in different projects. This setting also works when the debugger looks for the specified main class when launching a program.
+- `projectName` - The preferred project in which the debugger searches for classes. There could be duplicated class names in different projects. It is required when the workspace has multiple java projects, otherwise the expression evaluation and conditional breakpoint may not work.
+- `stepFilters` - Skip specified classes or methods when stepping.
+ - `classNameFilters` - [**Deprecated** - replaced by `skipClasses`] Skip the specified classes when stepping. Class names should be fully qualified. Wildcard is supported.
+ - `skipClasses` - Skip the specified classes when stepping.
+ - `$JDK` - Skip the JDK classes from the default system bootstrap classpath, such as rt.jar, jrt-fs.jar.
+ - `$Libraries` - Skip the classes from application libraries, such as Maven, Gradle dependencies.
+ - `java.*` - Skip the specified classes. Wildcard is supported.
+ - `java.lang.ClassLoader` - Skip the classloaders.
+ - `skipSynthetics` - Skip synthetic methods when stepping.
+ - `skipStaticInitializers` - Skip static initializer methods when stepping.
+ - `skipConstructors` - Skip constructor methods when stepping.
### User Settings
- `java.debug.logLevel`: minimum level of debugger logs that are sent to VS Code, defaults to `warn`.
- `java.debug.settings.showHex`: show numbers in hex format in "Variables" viewlet, defaults to `false`.
-- `java.debug.settings.showStaticVariables`: show static variables in "Variables" viewlet, defaults to `true`.
+- `java.debug.settings.showStaticVariables`: show static variables in "Variables" viewlet, defaults to `false`.
- `java.debug.settings.showQualifiedNames`: show fully qualified class names in "Variables" viewlet, defaults to `false`.
+- `java.debug.settings.showLogicalStructure`: show the logical structure for the Collection and Map classes in "Variables" viewlet, defaults to `true`.
+- `java.debug.settings.showToString`: show 'toString()' value for all classes that override 'toString' method in "Variables" viewlet, defaults to `true`.
- `java.debug.settings.maxStringLength`: the maximum length of string displayed in "Variables" or "Debug Console" viewlet, the string longer than this length will be trimmed, defaults to `0` which means no trim is performed.
+- `java.debug.settings.numericPrecision`: the precision when formatting doubles in "Variables" or "Debug Console" viewlet.
+- `java.debug.settings.hotCodeReplace`: Reload the changed Java classes during debugging, defaults to `manual`. See the [wiki page](https://github.com/Microsoft/vscode-java-debug/wiki/Hot-Code-Replace) for more information about usages and limitations.
+ - `manual` - Click the toolbar to apply the changes.
+ - `auto` - Automatically apply the changes after compilation. This only works when `'java.autobuild.enabled'` is on.
+ - `never` - Never apply the changes.
+- `java.debug.settings.enableRunDebugCodeLens`: enable the code lens provider for the run and debug buttons over main entry points, defaults to `true`.
+- `java.debug.settings.forceBuildBeforeLaunch`: force building the workspace before launching java program, defaults to `true`.
+- `java.debug.settings.onBuildFailureProceed`: Force to proceed when build fails, defaults to false.
+- `java.debug.settings.console`: The specified console to launch Java program, defaults to `integratedTerminal`. If you want to customize the console for a specific debug session, please modify the 'console' config in launch.json.
+ - `internalConsole` - VS Code debug console (input stream not supported).
+ - `integratedTerminal` - VS Code integrated terminal.
+ - `externalTerminal` - External terminal that can be configured in user settings.
+- `java.debug.settings.exceptionBreakpoint.exceptionTypes`: Specifies a set of exception types you want to break on, e.g. `java.lang.NullPointerException`. A specific exception type and its subclasses can be selected for caught exceptions, uncaught exceptions, or both can be selected.
+- `java.debug.settings.exceptionBreakpoint.allowClasses`: Specifies the allowed locations where the exception breakpoint can break on. Wildcard is supported, e.g. `java.*`, `*.Foo`.
+- `java.debug.settings.exceptionBreakpoint.skipClasses`: Skip the specified classes when breaking on exception.
+ - `$JDK` - Skip the JDK classes from the default system bootstrap classpath, such as rt.jar, jrt-fs.jar.
+ - `$Libraries` - Skip the classes from application libraries, such as Maven, Gradle dependencies.
+ - `java.*` - Skip the specified classes. Wildcard is supported.
+ - `java.lang.ClassLoader` - Skip the classloaders.
+- `java.debug.settings.stepping.skipClasses`: Skip the specified classes when stepping.
+ - `$JDK` - Skip the JDK classes from the default system bootstrap classpath, such as rt.jar, jrt-fs.jar.
+ - `$Libraries` - Skip the classes from application libraries, such as Maven, Gradle dependencies.
+ - `java.*` - Skip the specified classes. Wildcard is supported.
+ - `java.lang.ClassLoader` - Skip the classloaders.
+- `java.debug.settings.stepping.skipSynthetics`: Skip synthetic methods when stepping.
+- `java.debug.settings.stepping.skipStaticInitializers`: Skip static initializer methods when stepping.
+- `java.debug.settings.stepping.skipConstructors`: Skip constructor methods when stepping.
+- `java.debug.settings.jdwp.limitOfVariablesPerJdwpRequest`: The maximum number of variables or fields that can be requested in one JDWP request. The higher the value, the less frequently debuggee will be requested when expanding the variable view. Also a large number can cause JDWP request timeout. Defaults to 100.
+- `java.debug.settings.jdwp.requestTimeout`: The timeout (ms) of JDWP request when the debugger communicates with the target JVM. Defaults to 3000.
+- `java.debug.settings.jdwp.async`: Experimental: Controls whether the debugger is allowed to send JDWP commands asynchronously. Async mode can improve remote debugging response speed on high-latency networks. Defaults to `auto`, and automatically switch to async mode when the latency of a single jdwp request exceeds 15ms during attach debugging.
+ - `auto` (Default)
+ - `on`
+ - `off`
+- `java.debug.settings.vmArgs`: The default VM arguments to launch the Java program. Eg. Use '-Xmx1G -ea' to increase the heap size to 1GB and enable assertions. If you want to customize the VM arguments for a specific debug session, please modify the 'vmArgs' config in launch.json.
+- `java.debug.settings.debugSupportOnDecompiledSource`: [Experimental]: Enable debugging support on the decompiled source code. Be aware that this feature may affect the loading speed of Call Stack Viewlet. You also need [Language Support for Java by Red Hat](https://marketplace.visualstudio.com/items?itemName=redhat.java)@1.20.0 or higher to use this feature.
+- `java.silentNotification`: Controls whether notifications can be used to report progress. If true, use status bar to report progress instead. Defaults to `false`.
+
+> Pro Tip: The documentation [Configuration.md](https://github.com/microsoft/vscode-java-debug/blob/master/Configuration.md) provides lots of samples to demonstrate how to use these debug configurations, recommend to take a look.
+
+## Troubleshooting
+Reference the [Troubleshooting Guide](https://github.com/Microsoft/vscode-java-debug/blob/master/Troubleshooting.md) for common errors.
+Reference the [Troubleshooting Guide for Encoding Issues](https://github.com/Microsoft/vscode-java-debug/blob/master/Troubleshooting_encoding.md) for encoding issues.
+
+## Contributing
+If you are interested in fixing issues and contributing directly to the code base, please see the document [How to Contribute](https://github.com/microsoft/vscode-java-debug/blob/main/CONTRIBUTING.md).
## Feedback and Questions
You can find the full list of issues at [Issue Tracker](https://github.com/Microsoft/vscode-java-debug/issues). You can submit a [bug or feature suggestion](https://github.com/Microsoft/vscode-java-debug/issues/new), and participate community driven [](https://gitter.im/Microsoft/vscode-java-debug)
## License
-This extension is licensed under [MIT License](https://github.com/Microsoft/vscode-arduino/blob/master/LICENSE.txt).
+This extension is licensed under [MIT License](https://github.com/Microsoft/vscode-java-debug/blob/master/LICENSE.txt).
## Data/Telemetry
-Debugger for Java collects usage data and sends it to Microsoft to help improve our products and services. Read our [privacy statement](http://go.microsoft.com/fwlink/?LinkId=521839) to learn more.
+VS Code collects usage data and sends it to Microsoft to help improve our products and services. Read our [privacy statement](https://go.microsoft.com/fwlink/?LinkID=528096&clcid=0x409) to learn more. If you don't wish to send usage data to Microsoft, you can set the `telemetry.telemetryLevel` setting to `"off"`. Learn more in our [FAQ](https://code.visualstudio.com/docs/supporting/faq#_how-to-disable-telemetry-reporting).
diff --git a/SECURITY.md b/SECURITY.md
new file mode 100644
index 00000000..e138ec5d
--- /dev/null
+++ b/SECURITY.md
@@ -0,0 +1,41 @@
+
+
+## Security
+
+Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
+
+If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below.
+
+## Reporting Security Issues
+
+**Please do not report security vulnerabilities through public GitHub issues.**
+
+Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).
+
+If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).
+
+You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc).
+
+Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
+
+ * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
+ * Full paths of source file(s) related to the manifestation of the issue
+ * The location of the affected source code (tag/branch/commit or direct URL)
+ * Any special configuration required to reproduce the issue
+ * Step-by-step instructions to reproduce the issue
+ * Proof-of-concept or exploit code (if possible)
+ * Impact of the issue, including how an attacker might exploit the issue
+
+This information will help us triage your report more quickly.
+
+If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs.
+
+## Preferred Languages
+
+We prefer all communications to be in English.
+
+## Policy
+
+Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).
+
+
diff --git a/ThirdPartyNotices.txt b/ThirdPartyNotices.txt
new file mode 100644
index 00000000..063da394
--- /dev/null
+++ b/ThirdPartyNotices.txt
@@ -0,0 +1,174 @@
+vscode-java-debug
+
+THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
+Do Not Translate or Localize
+
+This project incorporates components from the projects listed below. The original copyright notices and the licenses under which Microsoft received such components are set forth below. Microsoft reserves all rights not expressly granted herein, whether by implication, estoppel or otherwise.
+
+1. omichelsen/compare-versions (https://github.com/omichelsen/compare-versions)
+2. motdotla/dotenv (https://github.com/motdotla/dotenv)
+3. lodash/lodash (https://github.com/lodash/lodash)
+4. uuidjs/uuid (https://github.com/uuidjs/uuid)
+5. Eskibear/vscode-extension-telemetry-wrapper (https://github.com/Eskibear/vscode-extension-telemetry-wrapper)
+6. Microsoft/vscode-languageserver-node (https://github.com/Microsoft/vscode-languageserver-node)
+
+
+%% omichelsen/compare-versions NOTICES AND INFORMATION BEGIN HERE
+=========================================
+The MIT License (MIT)
+
+Copyright (c) 2015-2017 Ole Michelsen
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+=========================================
+END OF omichelsen/compare-versions NOTICES AND INFORMATION
+
+%% motdotla/dotenv NOTICES AND INFORMATION BEGIN HERE
+=========================================
+BSD-2-Clause License
+
+Copyright (c) 2015, Scott Motte
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+=========================================
+END OF motdotla/dotenv NOTICES AND INFORMATION
+
+%% lodash/lodash NOTICES AND INFORMATION BEGIN HERE
+=========================================
+The MIT License
+
+Copyright JS Foundation and other contributors
+
+Based on Underscore.js, copyright Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors
+
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/lodash/lodash
+
+The following license applies to all parts of this software except as
+documented below:
+
+====
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+====
+
+Copyright and related rights for sample code are waived via CC0. Sample
+code is defined as all source code displayed within the prose of the
+documentation.
+
+CC0: http://creativecommons.org/publicdomain/zero/1.0/
+
+====
+
+Files located in the node_modules and vendor directories are externally
+maintained libraries used by this software which have their own
+licenses; we recommend you read them, as their terms may differ from the
+terms above.
+=========================================
+END OF lodash/lodash NOTICES AND INFORMATION
+
+%% uuidjs/uuid NOTICES AND INFORMATION BEGIN HERE
+=========================================
+The MIT License (MIT)
+
+Copyright (c) 2010-2020 Robert Kieffer and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+=========================================
+END OF uuidjs/uuid NOTICES AND INFORMATION
+
+%% Eskibear/vscode-extension-telemetry-wrapper NOTICES AND INFORMATION BEGIN HERE
+=========================================
+MIT License
+
+Copyright 2018 Yan Zhang
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+=========================================
+END OF Eskibear/vscode-extension-telemetry-wrapper NOTICES AND INFORMATION
+
+%% Microsoft/vscode-languageserver-node NOTICES AND INFORMATION BEGIN HERE
+=========================================
+Copyright (c) Microsoft Corporation
+
+All rights reserved.
+
+MIT License
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy,
+modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software
+is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
+OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+=========================================
+END OF Microsoft/vscode-languageserver-node NOTICES AND INFORMATION
\ No newline at end of file
diff --git a/Troubleshooting.md b/Troubleshooting.md
new file mode 100644
index 00000000..c20b431f
--- /dev/null
+++ b/Troubleshooting.md
@@ -0,0 +1,139 @@
+# Troubleshooting
+
+This document provides the information needed to troubleshoot common errors of Debugger for Java (the debugger). If it does not cover the problem you are seeing, please [log an issue](https://github.com/Microsoft/vscode-java-debug/issues) instead.
+
+## Java Language Support extension fails to start.
+The debugger works with [Language Support for Java(TM) by Red Hat](https://marketplace.visualstudio.com/items?itemName=redhat.java) (the language server) for source mapping and project support. If the language server fails to start, the debugger will not work as expected. Here is a simple way to check whether the language server is started. Open a .java or a Java project folder in VS Code, and then check the icon at the right side of the status bar. You should see the 👍 icon if the language server is loaded correctly.
+
+ .
+
+### Try:
+1. If you get the error *"The JAVA_HOME environment variable points to a missing folder"* or *"Java runtime could not be located"*, please make sure that the environment variable JAVA_HOME points to a valid JDK. Otherwise, ignore this step.
+2. Open your Maven *pom.xml* file or Gradle *build.gradle* file, then run VS Code command *"Java: Update project configuration"* to force the language server to update the project configuration/classpath.
+3. Run VS Code command *"Java: Clean the Java language server workspace"* to clean the stale workspace cache.
+4. Try more [troubleshooting guide](https://github.com/redhat-developer/vscode-java/wiki/Troubleshooting) from the language server product site.
+
+## Build failed, do you want to continue?
+### Reason:
+The error indicates your workspace has build errors. There are two kinds of build errors. One is compilation error for source code, the other is project error.
+
+### Try:
+1. Open VS Code PROBLEMS View, and fix the errors there.
+2. Run VS Code command *"Java: Open Java language server log file"*, search keyword `build/building workspace` to find more details for the build errors.
+3. If still cannot find out what errors, then reference the [language server troubleshooting](#try) paragraph to [2]update project configuration, and [3]clean workspace cache.
+
+## x.java isn't on the classpath. Only syntax errors will be reported
+### Reason:
+This error indicates the Java file you opened isn't on the classpath of any project, and no .class file will be generated because Java language server only auto builds Java source files on the project classpath. If you try to run or debug this Java file, you may get the error "Could not find or load main class".
+
+### Try:
+1. Go to *File Explorer*, right click the folder containing your Java file, and run the menu *"Add Folder to Java Source Path"* to mark the containing folder as a Java source root.
+2. Run VS Code command *"Java: List all Java source paths"* to check whether the containing folder is added as a Java source root.
+
+## Program Error: Could not find or load main class x
+### Reason:
+You configure the incorrect main class name in `mainClass` of *launch.json*, or your Java file is not on the classpath.
+
+### Try:
+1. Check whether the class name specified in `mainClass` exists and is in the right form.
+2. Run VS Code command *"Java: List all Java source paths"* to show all source paths recognized by the workspace.
+3. Check the Java file you are running is under any source path? If not, go to *File Explorer*, right click the folder containing your Java file, and run the menu *"Add Folder to Java Source Path"* to mark the containing folder as a Java source root.
+4. Run VS Code command *"Java: Force Java compilation"* to rebuild your workspace.
+5. If the problem persists, it's probably because the language server doesn't load your project correctly. Please reference the [language server troubleshooting](#try) paragraph for more troubleshooting info.
+
+## Program throws ClassNotFoundException
+### Reason:
+This error indicates your application attempts to reference some classes which are not found in the entire classpaths.
+
+### Try:
+1. Check whether you configure the required libraries in the dependency settings file (e.g. *pom.xml*).
+2. If you have recently modified the *pom.xml* or *build.gradle* config file, you need right click on *pom.xml* or *build.gradle* file and then run the menu *"Update project configuration"* to force the language server to update the project configuration/classpath.
+3. Run VS Code command *"Java: Force Java compilation"* to force the language server to rebuild the current project.
+4. If the problem persists, it's probably because the language server doesn't load your project correctly. Please reference the [language server troubleshooting](#try) paragraph for more troubleshooting info.
+
+## Program throws UnsupportedClassVersionError
+Below is a typical error message.
+
+
+
+### Reason:
+The compiled classes are not compatible with the runtime JDK.
+
+The class file version `57.65535` stands for Java 13 preview, where the major version `57` stands for Java 13, the minor version `65535` stands for preview feature. Similarly `58.65535` stands for Java 14 preview.
+
+The error says the compiled class is `57.65535`, but the runtime JDK only recognizes class file version `58.65535`. That's because the preview feature is not backward compatible, i.e. JVM 14 doesn't support 13 preview feature. The [openjdk](https://openjdk.java.net/jeps/12) website has claimed the reason that it would be costly for JDK 14 to support preview features from JDK 13 which were changed or dropped in response to feedback.
+
+One possible root cause for this error is your runtime JDK is the latest JDK but the upstream [Language Support for Java](https://marketplace.visualstudio.com/items?itemName=redhat.java) extension doesn't catch up the support yet.
+
+### Try:
+1. Try to update [Language Support for Java](https://marketplace.visualstudio.com/items?itemName=redhat.java) to the latest, and then try step 3 to rebuild the workspace.
+2. If it doesn't work, then try to install an older JDK version, set its installation folder to "java.home" user setting in _.vscode/settings.json_ and reopen your VS Code workspace.
+3. Click **F1** -> **Java: Force Java compilation** -> **Full** to rebuild the workspace.
+4. If it still doesn't work, then try **F1** -> **Java: Clean the Java language server workspace** to clean the cache.
+
+## Failed to complete hot code replace:
+### Reason:
+This error indicates you are doing `Hot Code Replace`. The `Hot Code Replace` feature depends on the underlying JVM implementation. If you get this error, that indicates the new changes cannot be hot replaced by JVM.
+
+### Try:
+1. Check the HCR limitation from the [wiki](https://github.com/microsoft/vscode-java-debug/wiki/Hot-Code-Replace).
+2. Restart your application to apply the new changes. Or ignore the message, and continue to debug.
+3. You can disable the hot code replace feature by changing the user setting `"java.debug.settings.hotCodeReplace": "never"`.
+
+## Please specify the host name and the port of the remote debuggee in the launch.json.
+### Reason:
+This error indicates you are debugging a remote Java application. The reason is that you don't configure the remote machine's host name and debug port correctly.
+
+### Try:
+1. Check whether the remote Java application is launched in debug mode. The typical command to enable debug mode is like *"java -agentlib:jdwp=transport=dt_socket,address=5005,server=y,suspend=n -classpath \ MyMainClass"*, where the parameter *"address=5005"* represents the target JVM exposes *5005* as the debug port.
+2. Check the debug port is not blocked by the remote machine's firewall.
+
+## Failed to evaluate. Reason: Cannot evaluate because the thread is resumed.
+### Reason:
+There are two possible reasons for this error.
+- Reason 1: you try to evaluate an expression when the target thread is running. Evaluation only works when your program is on suspend, for example, stopping at a breakpoint or stepping in/out/over.
+- Reason 2: you take the VS Code DEBUG CONSOLE view for program input by mistake. DEBUG CONSOLE only accepts input for evaluation, not for program console input.
+
+### Try:
+1. For Reason 1, try to add a breakpoint and stop your program there, then evaluate the expression.
+2. For Reason 2, try to change the `console` option in the *launch.json* to `externalTerminal` or `integratedTerminal`. This is the official solution for program console input.
+
+## Cannot find a class with the main method
+### Reason:
+When the `mainClass` is unconfigured in the *launch.json*, the debugger will resolve a class with main method automatically. This error indicates the debugger doesn't find any main class in the whole workspace.
+
+### Try:
+1. Check at least one main class exists in your workspace.
+2. If no main class exists, please create a main class first. Otherwise, it's probably because the language server fails to start. Please reference the [language server troubleshooting](#try) paragraph for more troubleshooting info.
+
+## No delegateCommandHandler for vscode.java.startDebugSession when starting Debugger
+### Reason:
+Cause of error is for now unknown, but something caused vscode java support and debugger to not be configured correctly.
+
+### Try:
+1. Restart VS Code and the issue should disappear
+2. If it continues to error try restart again, and if still a problem open an issue at [vscode-java-debug](https://github.com/Microsoft/vscode-java-debug)
+
+## Failed to resolve classpath:
+### Reason:
+Below are the common failure reasons.
+- 'C:\demo\com\microsoft\app\Main.java' is not a valid class name.
+- Main class 'com.microsoft.app.Main' doesn't exist in the workspace.
+- Main class 'com.microsoft.app.Main' isn't unique in the workspace.
+- The project 'demo' is not a valid java project.
+
+In launch mode, the debugger resolves the classpaths automatically based on the given `mainClass` and `projectName`. It looks for the class specified by `mainClass` as the entry point for launching an application. If there are multiple classes with the same name in the current workspace, the debugger uses the one inside the project specified by `projectName`.
+
+### Try:
+1. Check whether the class name specified in `mainClass` exists and is in the right form. The debugger only works with fully qualified class names, e.g. `com.microsoft.app.Main`.
+2. Check whether the `projectName` is correct. The actual project name is not always the same to the folder name you see in the File Explorer. Please check the value specified by `projectDescription/name` in the *.project* file, or the `artifactId` in the *pom.xml* for maven project, or the folder name for gradle project.
+3. If the problem persists, please try to use the debugger to regenerate the debug configurations in *launch.json*. Remove the existing *launch.json* file and press F5. The debugger will automatically generate a new *launch.json* with the right debug configurations.
+
+## Request type "xyz" is not supported. Only "launch" and "attach" are supported.
+### Reason:
+The value specified in `request` option of *launch.json* is incorrect.
+
+### Try:
+1. Reference the VS Code official document [launch configurations](https://code.visualstudio.com/docs/editor/debugging#_launch-configurations) about how to configure *launch.json*.
+2. Try to use the debugger to regenerate the debug configurations in *launch.json*. Remove the existing *launch.json* file and press F5. The debugger will automatically generate a new *launch.json* with the right debug configurations.
+
diff --git a/Troubleshooting_encoding.md b/Troubleshooting_encoding.md
new file mode 100644
index 00000000..834d3972
--- /dev/null
+++ b/Troubleshooting_encoding.md
@@ -0,0 +1,84 @@
+# Troubleshooting Guide for Encoding Issues
+
+This document provides a guide mostly for Windows users to solve common Java encoding issues.
+
+## 1. Background
+Computers can only understand the binary data such as 0 and 1, and it uses charset to encode/decode the data into real-world characters. When two processes interact with each other for I/O, they have to use the compatible charset for encoding and decoding, otherwise garbled characters will probably appear. macOS and Linux use UTF-8 everywhere and encoding is not a problem for them. For Windows, however, the default charset is not UTF-8 and is platform-dependent, which can lead to inconsistent encoding between different tools.
+
+## 2. Common Problems
+Below are the typical encoding problems when running a Java program on Windows terminal.
+
+2.1) The file or directory name contains unicode characters, Java launcher cannot find the corresponding classpath or main class well.
+```
+C:\Test>java -cp 中文目录 Hello
+Error: Could not find or load main class Hello
+```
+
+```
+C:\Test>java -cp ./Exercises 练习
+Error: Could not find or load main class ??
+Caused by: java.lang.ClassNotFoundException: ??
+```
+
+2.2) The string literals with unicode characters appear garbled when printed to the terminal.
+```java
+public class Hello {
+ public static void main(String[] args) {
+ System.out.println("你好!");
+ }
+}
+```
+
+```
+C:\Test>java -cp ./Exercises Hello
+??!
+```
+
+2.3) Garbled characters when Java program interacts with terminal for I/O.
+
+```java
+import java.util.Scanner;
+
+public class Hello {
+ public static void main(String[] args) {
+ Scanner scanner = new Scanner(System.in);
+ System.out.println(scanner.nextLine());
+ }
+}
+```
+
+```
+C:\Test>chcp
+65001
+
+C:\Test>java -Dfile.encoding=UTF-8 -cp ./Exercises Hello
+你好
+��
+```
+
+## 3.Troubleshooting Suggestions
+The following diagram shows the parts of encoding that may be involved when writing and running Java in VS Code.
+
+
+
+ Encoding on Windows
+
+
+- During the compilation phase, VS Code Java extension uses the file encoding from VS Code settings to read .java source files and compile .class files. Encoding is consistent between editor and Java extension.
+
+- During the run/debug phase, Java extension launches the application in the terminal by default. Most encoding problems occur because the terminal and JVM use incompatible charsets for data processing, or use charsets that do not support the target unicode characters.
+ - JVM - Uses a default charset compatible with the system locale of Windows platform, and you can change it by using the JVM argument `"-Dfile.encoding"`, or by using `"encoding"` setting in launch.json when running through Java debugger extension.
+ - Windows Terminals - Uses code page to handle encoding, and you can use `"chcp"` command to view and change the code page.
+
+To solve the encoding problems, the straightforward idea is to use UTF-8 in all toolchains. But unfortunately Windows terminals (such as cmd) do not support UTF-8 perfectly. Therefore, the alternative idea is to let the terminal and JVM use compatible character sets for data processing.
+
+### 3.1) Fix Suggestion : Change system locale to the target language.
+
+On Windows, when you change the system locale, the default Java charset will be changed to one compatible with the system locale, and the terminal's (e.g. cmd) code page will be automatically updated to be consistent as well. Therefore, changing system locale to the target language can solve most encoding issues on Windows. This is also suggested by Java site https://www.java.com/en/download/help/locale.html.
+
+The following screenshot shows how to change the system locale in Windows. for example, if I want to use a terminal to enter Chinese characters into a Java program, I can set the Windows system locale to Chinese. The default Java charset will be `"GBK"` and the cmd codepage will be `"936"`, which will support Chinese characters nicely.
+