(uri: string, breakpoints: DebugProtocol.SourceBreakpoint[])
| 152 | } |
| 153 | |
| 154 | public setBreakpoints(uri: string, breakpoints: DebugProtocol.SourceBreakpoint[]): Promise<any[]> { |
| 155 | // Remember these bps for when new threads start. |
| 156 | if (breakpoints.length === 0) |
| 157 | delete this.bps[uri]; |
| 158 | else |
| 159 | this.bps[uri] = breakpoints; |
| 160 | |
| 161 | let promise; |
| 162 | |
| 163 | for (const thread of this.threads) { |
| 164 | if (thread.runnable) { |
| 165 | const result = thread.setBreakpoints(this.logger, uri, breakpoints); |
| 166 | if (!promise) |
| 167 | promise = result; |
| 168 | } |
| 169 | } |
| 170 | |
| 171 | if (promise) |
| 172 | return promise; |
| 173 | |
| 174 | const completer = new PromiseCompleter<boolean[]>(); |
| 175 | completer.resolve(breakpoints.map(() => true)); |
| 176 | return completer.promise; |
| 177 | } |
| 178 | |
| 179 | public nextDataId = 1; |
| 180 | public storedData: { [id: number]: StoredData } = {}; |
nothing calls this directly
no test coverage detected