don't access body on failure; fixes #60998
This commit is contained in:
parent
66c88aa2bc
commit
fe51ed01dd
1 changed files with 25 additions and 23 deletions
|
@ -121,29 +121,31 @@ function convertPaths(msg: DebugProtocol.ProtocolMessage, fixSourcePaths: (toDA:
|
|||
break;
|
||||
case 'response':
|
||||
const response = <DebugProtocol.Response>msg;
|
||||
switch (response.command) {
|
||||
case 'stackTrace':
|
||||
const r1 = <DebugProtocol.StackTraceResponse>response;
|
||||
r1.body.stackFrames.forEach(frame => fixSourcePaths(false, frame.source));
|
||||
break;
|
||||
case 'loadedSources':
|
||||
const r2 = <DebugProtocol.LoadedSourcesResponse>response;
|
||||
r2.body.sources.forEach(source => fixSourcePaths(false, source));
|
||||
break;
|
||||
case 'scopes':
|
||||
const r3 = <DebugProtocol.ScopesResponse>response;
|
||||
r3.body.scopes.forEach(scope => fixSourcePaths(false, scope.source));
|
||||
break;
|
||||
case 'setFunctionBreakpoints':
|
||||
const r4 = <DebugProtocol.SetFunctionBreakpointsResponse>response;
|
||||
r4.body.breakpoints.forEach(bp => fixSourcePaths(false, bp.source));
|
||||
break;
|
||||
case 'setBreakpoints':
|
||||
const r5 = <DebugProtocol.SetBreakpointsResponse>response;
|
||||
r5.body.breakpoints.forEach(bp => fixSourcePaths(false, bp.source));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
if (response.success) {
|
||||
switch (response.command) {
|
||||
case 'stackTrace':
|
||||
const r1 = <DebugProtocol.StackTraceResponse>response;
|
||||
r1.body.stackFrames.forEach(frame => fixSourcePaths(false, frame.source));
|
||||
break;
|
||||
case 'loadedSources':
|
||||
const r2 = <DebugProtocol.LoadedSourcesResponse>response;
|
||||
r2.body.sources.forEach(source => fixSourcePaths(false, source));
|
||||
break;
|
||||
case 'scopes':
|
||||
const r3 = <DebugProtocol.ScopesResponse>response;
|
||||
r3.body.scopes.forEach(scope => fixSourcePaths(false, scope.source));
|
||||
break;
|
||||
case 'setFunctionBreakpoints':
|
||||
const r4 = <DebugProtocol.SetFunctionBreakpointsResponse>response;
|
||||
r4.body.breakpoints.forEach(bp => fixSourcePaths(false, bp.source));
|
||||
break;
|
||||
case 'setBreakpoints':
|
||||
const r5 = <DebugProtocol.SetBreakpointsResponse>response;
|
||||
r5.body.breakpoints.forEach(bp => fixSourcePaths(false, bp.source));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue