@@ -3,11 +3,7 @@ import { MenuModelRegistry } from '@theia/core/lib/common/menu/menu-model-regist
3
3
import { nls } from '@theia/core/lib/common/nls' ;
4
4
import { MaybePromise } from '@theia/core/lib/common/types' ;
5
5
import { inject , injectable } from '@theia/core/shared/inversify' ;
6
- import {
7
- SelectManually ,
8
- noBoardSelected ,
9
- noSketchOpened ,
10
- } from '../../common/nls' ;
6
+ import { noBoardSelected , noSketchOpened } from '../../common/nls' ;
11
7
import {
12
8
BoardDetails ,
13
9
BoardIdentifier ,
@@ -17,7 +13,6 @@ import {
17
13
SketchRef ,
18
14
isBoardIdentifierChangeEvent ,
19
15
isCompileSummary ,
20
- isProgrammer ,
21
16
} from '../../common/protocol' ;
22
17
import { BoardsDataStore } from '../boards/boards-data-store' ;
23
18
import { BoardsServiceProvider } from '../boards/boards-service-provider' ;
@@ -225,43 +220,10 @@ export class Debug extends SketchContribution {
225
220
const result = await this . debug ( params ) ;
226
221
return Boolean ( result ) ;
227
222
} catch ( err ) {
228
- const yes = nls . localize ( 'vscode/extensionsUtils/yes' , 'Yes' ) ;
229
- const sketchUri = await this . fileSystemExt . getUri ( params . sketchPath ) ;
230
- const sketch = SketchRef . fromUri ( sketchUri ) ;
231
- if ( err instanceof Error && / m i s s i n g p r o g r a m m e r / gi. test ( err . message ) ) {
232
- const answer = await this . messageService . warn (
233
- nls . localize (
234
- 'arduino/debug/programmerNotSelected' ,
235
- 'The debugger requires a programmer. Do you want to select a programmer? You can select it manually from the Tools > Programmer menu.'
236
- ) ,
237
- SelectManually ,
238
- yes
239
- ) ;
240
- if ( answer === yes ) {
241
- const result = await this . commandService . executeCommand (
242
- 'arduino-select-programmer'
243
- ) ;
244
- if ( isProgrammer ( result ) ) {
245
- return this . startDebug ( ) ;
246
- }
247
- }
248
- } else if ( await this . isSketchNotVerifiedError ( err , sketch ) ) {
249
- const answer = await this . messageService . error (
250
- nls . localize (
251
- 'arduino/debug/sketchIsNotCompiled' ,
252
- "Sketch '{0}' must be verified before starting a debug session." ,
253
- sketch . name
254
- ) ,
255
- yes
256
- ) ;
257
- if ( answer === yes ) {
258
- this . commandService . executeCommand ( 'arduino-verify-sketch' ) ;
259
- }
260
- } else {
261
- this . messageService . error (
262
- err instanceof Error ? err . message : String ( err )
263
- ) ;
264
- }
223
+ console . error ( err ) ;
224
+ this . messageService . error (
225
+ err instanceof Error ? err . message : String ( err )
226
+ ) ;
265
227
}
266
228
return false ;
267
229
}
0 commit comments