|
1 | 1 | "use strict"; |
2 | 2 |
|
3 | | -import { Variable, DebugSession, InitializedEvent, TerminatedEvent, StoppedEvent, OutputEvent, Thread, StackFrame, Scope, Source, Handles } from "vscode-debugadapter"; |
| 3 | +import { DebugSession, InitializedEvent, TerminatedEvent, StoppedEvent, OutputEvent, Thread, StackFrame, Scope, Source, Handles } from "vscode-debugadapter"; |
4 | 4 | import { ThreadEvent } from "vscode-debugadapter"; |
5 | 5 | import { DebugProtocol } from "vscode-debugprotocol"; |
6 | | -import { readFileSync } from "fs"; |
7 | | -import { basename } from "path"; |
8 | 6 | import * as path from "path"; |
9 | | -import * as os from "os"; |
10 | 7 | import * as fs from "fs"; |
11 | | -import * as child_process from "child_process"; |
12 | | -import * as StringDecoder from "string_decoder"; |
13 | | -import * as net from "net"; |
14 | 8 | import { PythonProcess } from "./PythonProcess"; |
15 | | -import { FrameKind, IPythonProcess, IPythonThread, IPythonModule, IPythonEvaluationResult, IPythonStackFrame, IDebugServer } from "./Common/Contracts"; |
| 9 | +import { IPythonThread, IPythonModule, IPythonEvaluationResult, IPythonStackFrame, IDebugServer } from "./Common/Contracts"; |
16 | 10 | import { IPythonBreakpoint, PythonBreakpointConditionKind, PythonBreakpointPassCountKind, IPythonException, PythonEvaluationResultReprKind, enum_EXCEPTION_STATE } from "./Common/Contracts"; |
17 | 11 | import { BaseDebugServer } from "./DebugServers/BaseDebugServer"; |
18 | | -import { DebugClient, DebugType } from "./DebugClients/DebugClient"; |
| 12 | +import { DebugClient } from "./DebugClients/DebugClient"; |
19 | 13 | import { CreateAttachDebugClient, CreateLaunchDebugClient } from "./DebugClients/DebugFactory"; |
20 | | -import { DjangoApp, LaunchRequestArguments, AttachRequestArguments, DebugFlags, DebugOptions, TelemetryEvent, PythonEvaluationResultFlags } from "./Common/Contracts"; |
| 14 | +import { LaunchRequestArguments, AttachRequestArguments, DebugOptions, TelemetryEvent, PythonEvaluationResultFlags } from "./Common/Contracts"; |
21 | 15 | import * as telemetryContracts from "../common/telemetryContracts"; |
22 | | -import { validatePath, validatePathSync, getPythonExecutable } from './Common/Utils'; |
| 16 | +import { validatePath, getPythonExecutable } from './Common/Utils'; |
23 | 17 | import { isNotInstalledError } from '../common/helpers'; |
24 | 18 |
|
25 | 19 | const CHILD_ENUMEARATION_TIMEOUT = 5000; |
@@ -347,11 +341,10 @@ export class PythonDebugger extends DebugSession { |
347 | 341 | } |
348 | 342 |
|
349 | 343 | let breakpoints: { verified: boolean, line: number }[] = []; |
350 | | - let breakpointsToRemove = []; |
351 | 344 | let linesToAdd = args.breakpoints.map(b => b.line); |
352 | 345 | let registeredBks = this.registeredBreakpointsByFileName.get(args.source.path); |
353 | 346 | let linesToRemove = registeredBks.map(b => b.LineNo).filter(oldLine => linesToAdd.indexOf(oldLine) === -1); |
354 | | - let linesToUpdate = registeredBks.map(b => b.LineNo).filter(oldLine => linesToAdd.indexOf(oldLine) >= 0); |
| 347 | + // let linesToUpdate = registeredBks.map(b => b.LineNo).filter(oldLine => linesToAdd.indexOf(oldLine) >= 0); |
355 | 348 |
|
356 | 349 | // Always add new breakpoints, don't re-enable previous breakpoints |
357 | 350 | // Cuz sometimes some breakpoints get added too early (e.g. in django) and don't get registeredBks |
|
0 commit comments