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
237237 config . shortenCommandLine = await detectLaunchCommandStyle ( config ) ;
238238 }
239239
240+ if ( process . platform === "win32" && config . request === "launch" && config . console !== "internalConsole" ) {
241+ config . launcherScript = utility . getLauncherScriptPath ( ) ;
242+ }
243+
240244 const debugServerPort = await lsPlugin . startDebugSession ( ) ;
241245 if ( debugServerPort ) {
242246 config . debugServer = debugServerPort ;
Original file line number Diff line number Diff line change 11// Copyright (c) Microsoft Corporation. All rights reserved.
22// Licensed under the MIT license.
33
4+ import * as path from "path" ;
45import * as vscode from "vscode" ;
56import { setUserError } from "vscode-extension-telemetry-wrapper" ;
67import { logger , Type } from "./logger" ;
78
89const TROUBLESHOOTING_LINK = "https://github.com/Microsoft/vscode-java-debug/blob/master/Troubleshooting.md" ;
910const LEARN_MORE = "Learn More" ;
1011const JAVA_EXTENSION_ID = "redhat.java" ;
12+ const DEBUGGER_EXTENSION_ID = "vscjava.vscode-java-debug" ;
1113
1214export class UserError extends Error {
1315 public context : ITroubleshootingMessage ;
@@ -158,3 +160,8 @@ export function isJavaExtEnabled(): boolean {
158160 const javaExt = vscode . extensions . getExtension ( JAVA_EXTENSION_ID ) ;
159161 return ! ! javaExt ;
160162}
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