Skip to content

Commit f926b58

Browse files
committed
✨ remote path mapping
1 parent 49ec97f commit f926b58

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/test/debugger/attach.ptvsd.test.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ suite('Attach Debugger - Experimental', () => {
5656

5757
// Set the path for PTVSD to be picked up.
5858
// tslint:disable-next-line:no-string-literal
59-
customEnv['PYTHONPATH'] = '/home/don/Desktop/development/vscode/ptvsd';
59+
customEnv['PYTHONPATH'] = ptvsdPath;
6060
const pythonArgs = ['-m', 'ptvsd', '--server', '--port', `${port}`, '--file', fileToDebug];
6161
procToKill = spawn('python', pythonArgs, { env: customEnv, cwd: path.dirname(fileToDebug) });
6262
// wait for remote socket to start
@@ -116,9 +116,7 @@ suite('Attach Debugger - Experimental', () => {
116116
stdOutPromise, stdErrPromise
117117
]);
118118

119-
// Unfortunately PTVSD will be running on the current OS, hence paths will be concatenated using current OS path separator.
120-
const expectedBreapointFile = path.join(localRoot, path.basename(fileToDebug));
121-
await debugClient.assertStoppedLocation('breakpoint', { path: expectedBreapointFile, column: 1, line: 12 });
119+
await debugClient.assertStoppedLocation('breakpoint', breakpointLocation);
122120

123121
await Promise.all([
124122
continueDebugging(debugClient),
@@ -136,7 +134,7 @@ suite('Attach Debugger - Experimental', () => {
136134

137135
await testAttachingToRemoteProcess(path.dirname(fileToDebug), path.dirname(fileToDebug), path.sep);
138136
});
139-
test('Confirm localpath translations are done correctly', async function () {
137+
test('Confirm local and remote paths are translated', async function () {
140138
this.timeout(20000);
141139
this.retries(0);
142140
// Lets skip this test on AppVeyor (very flaky on AppVeyor).
@@ -145,7 +143,7 @@ suite('Attach Debugger - Experimental', () => {
145143
}
146144

147145
const localWorkspace = IS_WINDOWS ? '/home/user/Desktop/project/src' : 'C:\\Project\\src';
148-
const pathSeparator = IS_WINDOWS ? '\\' : '/';
146+
const pathSeparator = IS_WINDOWS ? '/' : '\\';
149147
await testAttachingToRemoteProcess(localWorkspace, path.dirname(fileToDebug), pathSeparator);
150148
});
151149
});

0 commit comments

Comments
 (0)