Skip to content

Fix mapping of breakpoints when debugging a local file on Windows #1586

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/debug/debugSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,11 @@ export class ObjectScriptDebugSession extends LoggingDebugSession {
try {
await this._waitForDebugTarget();

const uri = vscode.Uri.parse(args.source.path);
// args.source.path is a file path if the file is local and is a stringified Uri if the file is virtual
const uri =
(this._workspaceFolderUri ?? vscode.workspace.workspaceFolders[0]?.uri)?.scheme == "file"
? vscode.Uri.file(args.source.path)
: vscode.Uri.parse(args.source.path);
const wsFolder = vscode.workspace.getWorkspaceFolder(uri);
if (!wsFolder || (this._workspaceFolderUri && wsFolder.uri.toString() != this._workspaceFolderUri.toString())) {
response.body = {
Expand Down