File tree Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change
1
+ @ echo off
2
+
3
+ REM Change code page to UTF-8 for better compatibility.
4
+ @ chcp.com 65001 > NUL
5
+
6
+ REM Execute real command passed by args
7
+ %*
Original file line number Diff line number Diff line change @@ -237,6 +237,10 @@ export class JavaDebugConfigurationProvider implements vscode.DebugConfiguration
237
237
config . shortenCommandLine = await detectLaunchCommandStyle ( config ) ;
238
238
}
239
239
240
+ if ( process . platform === "win32" && config . request === "launch" && config . console !== "internalConsole" ) {
241
+ config . launcherScript = utility . getLauncherScriptPath ( ) ;
242
+ }
243
+
240
244
const debugServerPort = await lsPlugin . startDebugSession ( ) ;
241
245
if ( debugServerPort ) {
242
246
config . debugServer = debugServerPort ;
Original file line number Diff line number Diff line change 1
1
// Copyright (c) Microsoft Corporation. All rights reserved.
2
2
// Licensed under the MIT license.
3
3
4
+ import * as path from "path" ;
4
5
import * as vscode from "vscode" ;
5
6
import { setUserError } from "vscode-extension-telemetry-wrapper" ;
6
7
import { logger , Type } from "./logger" ;
7
8
8
9
const TROUBLESHOOTING_LINK = "https://github.com/Microsoft/vscode-java-debug/blob/master/Troubleshooting.md" ;
9
10
const LEARN_MORE = "Learn More" ;
10
11
const JAVA_EXTENSION_ID = "redhat.java" ;
12
+ const DEBUGGER_EXTENSION_ID = "vscjava.vscode-java-debug" ;
11
13
12
14
export class UserError extends Error {
13
15
public context : ITroubleshootingMessage ;
@@ -158,3 +160,8 @@ export function isJavaExtEnabled(): boolean {
158
160
const javaExt = vscode . extensions . getExtension ( JAVA_EXTENSION_ID ) ;
159
161
return ! ! javaExt ;
160
162
}
163
+
164
+ export function getLauncherScriptPath ( ) {
165
+ const ext = vscode . extensions . getExtension ( DEBUGGER_EXTENSION_ID ) ;
166
+ return path . join ( ext . extensionPath , "scripts" , "launcher.bat" ) ;
167
+ }
You can’t perform that action at this time.
0 commit comments