File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 200200 {
201201 "command" : " java.debug.hotCodeReplace" ,
202202 "group" : " navigation@100" ,
203- "when" : " inDebugMode && debugType == java && javaHotReload == 'manual'"
203+ "when" : " inDebugMode && debugType == java && javaHotReload == 'manual' && javaHotReloadOn "
204204 }
205205 ],
206206 "debug/callstack/context" : [
Original file line number Diff line number Diff line change @@ -30,6 +30,14 @@ export function initializeHotCodeReplace(context: vscode.ExtensionContext) {
3030 vscode . commands . executeCommand ( "setContext" , "javaHotReload" , getHotReloadFlag ( ) ) ;
3131 }
3232 } ) ;
33+ vscode . debug . onDidStartDebugSession ( ( session ) => {
34+ if ( session ?. configuration . noDebug && ! vscode . debug . activeDebugSession ) {
35+ vscode . commands . executeCommand ( "setContext" , "javaHotReloadOn" , false ) ;
36+ }
37+ } ) ;
38+ vscode . debug . onDidChangeActiveDebugSession ( ( session ) => {
39+ vscode . commands . executeCommand ( "setContext" , "javaHotReloadOn" , session && ! session . configuration . noDebug ) ;
40+ } ) ;
3341 context . subscriptions . push ( vscode . debug . onDidTerminateDebugSession ( ( session ) => {
3442 const t = session ? session . type : undefined ;
3543 if ( t === JAVA_LANGID ) {
You can’t perform that action at this time.
0 commit comments