forked from microsoft/vscode-jupyter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* During notebook cell debugging, apply path normalization on the path of the dumped tmp file only if the kernel runs on a Windows machine.
- Loading branch information
Ádám Zlatniczki
committed
Oct 2, 2022
1 parent
06ca869
commit f665497
Showing
5 changed files
with
51 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Fixed a bug that introduced a cross-OS interworking issue, making the notebook cell debugger skip breakpoints when VSCode is run on Windows but the kernel is run on Unix | ||
(thanks [Adam Zlatniczki](https://github.com/adam-zlatniczki)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
import { expect } from 'chai'; | ||
import { KernelDebugAdapterBase } from '../../../notebooks/debugger/kernelDebugAdapterBase'; | ||
import { IDumpCellResponse } from '../../../notebooks/debugger/debuggingTypes'; | ||
|
||
suite('Debugging - KernelDebugAdapterBase', () => { | ||
suite('extractDumpFilePathOnKernelSide', async () => { | ||
test('Kernel runs on Windows backend', () => { | ||
const mockResponseFromKernel = { sourcePath: 'c:\\tmp\\1.py' } as IDumpCellResponse; | ||
const path = KernelDebugAdapterBase.extractDumpFilePathOnKernelSide(mockResponseFromKernel); | ||
expect(path).to.equal('c:\\tmp\\1.py'); | ||
}); | ||
|
||
test('Kernel runs on Windows backend with ipykernel issue', () => { | ||
const mockResponseFromKernel = { sourcePath: 'c:\\tmp/1.py' } as IDumpCellResponse; | ||
const path = KernelDebugAdapterBase.extractDumpFilePathOnKernelSide(mockResponseFromKernel); | ||
expect(path).to.equal('c:\\tmp\\1.py'); | ||
}); | ||
|
||
test('Kernel runs on Unix backend', () => { | ||
const mockResponseFromKernel = { sourcePath: '/tmp/1.py' } as IDumpCellResponse; | ||
const path = KernelDebugAdapterBase.extractDumpFilePathOnKernelSide(mockResponseFromKernel); | ||
expect(path).to.equal('/tmp/1.py'); | ||
}); | ||
}); | ||
}); |