Skip to content

Commit

Permalink
Revert "Ensure using request: launch item in launch.json for debuggin…
Browse files Browse the repository at this point in the history
…g sends pathmappings (#5552)"

This reverts commit 1fad96f.
  • Loading branch information
DonJayamanne committed May 30, 2019
1 parent 3ea2782 commit 02986b6
Show file tree
Hide file tree
Showing 4 changed files with 247 additions and 283 deletions.
13 changes: 0 additions & 13 deletions src/client/debugger/extension/configuration/resolvers/launch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,19 +122,6 @@ export class LaunchConfigurationResolver extends BaseConfigurationResolver<Launc
if (debugConfiguration.pyramid) {
debugConfiguration.program = (await this.configurationProviderUtils.getPyramidStartupScriptFilePath(workspaceFolder))!;
}
if (!debugConfiguration.pathMappings) {
debugConfiguration.pathMappings = workspaceFolder ? [{
localRoot: workspaceFolder.fsPath,
remoteRoot: '.'
}] : [];
}
// This is for backwards compatibility.
if (debugConfiguration.localRoot && debugConfiguration.remoteRoot) {
debugConfiguration.pathMappings!.push({
localRoot: debugConfiguration.localRoot,
remoteRoot: debugConfiguration.remoteRoot
});
}
this.sendTelemetry(
debugConfiguration.request as 'launch' | 'test',
debugConfiguration
Expand Down
6 changes: 3 additions & 3 deletions src/client/debugger/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ interface ICommonDebugArguments {
// Show return values of functions while stepping.
showReturnValue?: boolean;
subProcess?: boolean;
}
export interface IKnownAttachDebugArguments extends ICommonDebugArguments {
workspaceFolder?: string;
// An absolute path to local directory with source.
localRoot?: string;
remoteRoot?: string;
pathMappings?: { localRoot: string; remoteRoot: string }[];
}
export interface IKnownAttachDebugArguments extends ICommonDebugArguments {
workspaceFolder?: string;
customDebugger?: boolean;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -373,16 +373,6 @@ suite('Debugging - Config Resolver Launch', () => {
expect(debugConfig).to.have.property('justMyCode', testParams.expectedResult);
});
});
test('Ensure pathMappings property is correctly derived', async () => {
const pythonPath = `PythonPath_${new Date().toString()}`;
const workspaceFolder = createMoqWorkspaceFolder(__dirname);
const pythonFile = 'xyz.py';
setupIoc(pythonPath);
setupActiveEditor(pythonFile, PYTHON_LANGUAGE);
const debugConfig = await debugProvider.resolveDebugConfiguration!(workspaceFolder, { localRoot: 'abc', remoteRoot: 'remoteabc' } as LaunchRequestArguments);
expect(debugConfig).to.have.property('pathMappings');
expect(debugConfig!.pathMappings).to.deep.equal([{ localRoot: workspaceFolder.uri.fsPath, remoteRoot: '.' }, { localRoot: 'abc', remoteRoot: 'remoteabc' }]);
});
async function testFixFilePathCase(isWindows: boolean, isMac: boolean, isLinux: boolean) {
const pythonPath = `PythonPath_${new Date().toString()}`;
const workspaceFolder = createMoqWorkspaceFolder(__dirname);
Expand Down
Loading

0 comments on commit 02986b6

Please sign in to comment.