From 1e4e7d8f68f6f7ec2690c57dded277988c254be8 Mon Sep 17 00:00:00 2001 From: Adam Zlatniczki Date: Fri, 16 Sep 2022 14:53:03 +0200 Subject: [PATCH 1/2] Fixed cell debugger problem with remote kernels * kernelDebugAdapter shouldn't try to convert the file path that it receives from the kernel based on the OS where VSCode is run, because it leads to files not being found on the kernel side, which in turn breaks debugging of a cell --- src/notebooks/debugger/kernelDebugAdapter.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/notebooks/debugger/kernelDebugAdapter.ts b/src/notebooks/debugger/kernelDebugAdapter.ts index c6ee1bd5bda..33d922230ab 100644 --- a/src/notebooks/debugger/kernelDebugAdapter.ts +++ b/src/notebooks/debugger/kernelDebugAdapter.ts @@ -3,7 +3,6 @@ 'use strict'; -import * as path from '../../platform/vscode-path/path'; import { IDumpCellResponse } from './debuggingTypes'; import { traceError } from '../../platform/logging'; import { KernelDebugAdapterBase } from './kernelDebugAdapterBase'; @@ -22,9 +21,9 @@ export class KernelDebugAdapter extends KernelDebugAdapterBase { const response = await this.session.customRequest('dumpCell', { code: cell.document.getText().replace(/\r\n/g, '\n') }); - const norm = path.normalize((response as IDumpCellResponse).sourcePath); - this.fileToCell.set(norm, cell.document.uri); - this.cellToFile.set(cell.document.uri.toString(), norm); + const pathOnKernelSide = (response as IDumpCellResponse).sourcePath; + this.fileToCell.set(pathOnKernelSide, cell.document.uri); + this.cellToFile.set(cell.document.uri.toString(), pathOnKernelSide); } catch (err) { traceError(err); } From e891929867b0247e443f0cad6c04df585630b791 Mon Sep 17 00:00:00 2001 From: Adam Zlatniczki Date: Fri, 16 Sep 2022 14:53:03 +0200 Subject: [PATCH 2/2] Fixed cell debugger problem with remote kernels (#11396) * kernelDebugAdapter shouldn't try to convert the file path that it receives from the kernel based on the OS where VSCode is run, because it leads to files not being found on the kernel side, which in turn breaks debugging of a cell --- news/2 Fixes/11396.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 news/2 Fixes/11396.md diff --git a/news/2 Fixes/11396.md b/news/2 Fixes/11396.md new file mode 100644 index 00000000000..98ee1a012e1 --- /dev/null +++ b/news/2 Fixes/11396.md @@ -0,0 +1,2 @@ +Fixed an interworking issue when running VSCode on Windows and connecting to a remote kernel that runs on some Unix distribution. Due to file path naming convention collisions, cell debugging failed. +(thanks [Adam Zlatniczki](https://github.com/adam-zlatniczki))