File tree Expand file tree Collapse file tree 7 files changed +12
-27
lines changed Expand file tree Collapse file tree 7 files changed +12
-27
lines changed Original file line number Diff line number Diff line change 169169 ],
170170 "arduino" : {
171171 "arduino-cli" : {
172- "version" : " 0.35.2 "
172+ "version" : " 0.35.3 "
173173 },
174174 "arduino-fwuploader" : {
175175 "version" : " 2.4.1"
Original file line number Diff line number Diff line change @@ -398,12 +398,9 @@ export async function isDebugEnabled(
398398 `Failed to append boards config to the FQBN. Original FQBN was: ${ fqbn } `
399399 ) ;
400400 }
401- if ( ! data . selectedProgrammer ) {
402- throw new Error ( noProgrammerSelectedFor ( board . name ) ) ;
403- }
404401 const params = {
405402 fqbn : fqbnWithConfig ,
406- programmer : data . selectedProgrammer . id ,
403+ programmer : data . selectedProgrammer ? .id ,
407404 } ;
408405 try {
409406 const debugFqbn = await checkDebugEnabled ( params ) ;
@@ -443,13 +440,3 @@ export function debuggingNotSupported(boardName: string): string {
443440 boardName
444441 ) ;
445442}
446- /**
447- * (non-API)
448- */
449- export function noProgrammerSelectedFor ( boardName : string ) : string {
450- return nls . localize (
451- 'arduino/debug/noProgrammerSelectedFor' ,
452- "No programmer selected for '{0}'" ,
453- boardName
454- ) ;
455- }
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ export interface CheckDebugEnabledParams {
9595 * The FQBN might contain custom board config options. For example, `arduino:esp32:nano_nora:USBMode=hwcdc,option2=value2`.
9696 */
9797 readonly fqbn : string ;
98- readonly programmer : string ;
98+ readonly programmer ? : string ;
9999}
100100
101101export interface BoardSearch extends Searchable . Options {
Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ export class BoardsServiceImpl
178178 const req = new IsDebugSupportedRequest ( )
179179 . setInstance ( instance )
180180 . setFqbn ( fqbn )
181- . setProgrammer ( programmer ) ;
181+ . setProgrammer ( programmer ?? '' ) ;
182182 try {
183183 const debugFqbn = await new Promise < string > ( ( resolve , reject ) =>
184184 client . isDebugSupported ( req , ( err , resp ) => {
Original file line number Diff line number Diff line change @@ -28,7 +28,6 @@ import {
2828 debuggingNotSupported ,
2929 isDebugEnabled ,
3030 noPlatformInstalledFor ,
31- noProgrammerSelectedFor ,
3231} from '../../browser/contributions/debug' ;
3332import { NotificationCenter } from '../../browser/notification-center' ;
3433import { noBoardSelected } from '../../common/nls' ;
@@ -117,20 +116,20 @@ describe('debug', () => {
117116 ) ;
118117 } ) ;
119118
120- it ( 'should error when no programmer selected' , async ( ) => {
119+ it ( 'should resolve when no programmer is selected (arduino/arduino-cli#2540) ' , async ( ) => {
121120 const copyData : Mutable < BoardsDataStore . Data > = deepClone ( data ) ;
122121 delete copyData . selectedProgrammer ;
123- await rejects (
122+ await doesNotReject (
124123 isDebugEnabled (
125124 board ,
126125 ( ) => boardDetails ,
127126 ( ) => copyData ,
128127 ( fqbn ) => fqbn ,
129- unexpectedCall ( )
130- ) ,
131- ( reason ) =>
132- reason instanceof Error &&
133- reason . message === noProgrammerSelectedFor ( board . name )
128+ async ( params ) => {
129+ expect ( params . programmer ) . to . be . undefined ;
130+ return params . fqbn ;
131+ }
132+ )
134133 ) ;
135134 } ) ;
136135
Original file line number Diff line number Diff line change 196196 "theiaPlugins" : {
197197 "vscode-builtin-cpp" : " https://open-vsx.org/api/vscode/cpp/1.52.1/file/vscode.cpp-1.52.1.vsix" ,
198198 "vscode-arduino-api" : " https://github.com/dankeboy36/vscode-arduino-api/releases/download/0.1.2/vscode-arduino-api-0.1.2.vsix" ,
199- "vscode-arduino-tools" : " https://downloads.arduino.cc/vscode-arduino-tools/vscode-arduino-tools-0.1.2 .vsix" ,
199+ "vscode-arduino-tools" : " https://downloads.arduino.cc/vscode-arduino-tools/vscode-arduino-tools-0.1.3 .vsix" ,
200200 "vscode-builtin-json" : " https://open-vsx.org/api/vscode/json/1.46.1/file/vscode.json-1.46.1.vsix" ,
201201 "vscode-builtin-json-language-features" : " https://open-vsx.org/api/vscode/json-language-features/1.46.1/file/vscode.json-language-features-1.46.1.vsix" ,
202202 "cortex-debug" : " https://downloads.arduino.cc/marus25.cortex-debug/marus25.cortex-debug-1.5.1.vsix" ,
Original file line number Diff line number Diff line change 213213 "debuggingNotSupported" : " Debugging is not supported by '{0}'" ,
214214 "getDebugInfo" : " Getting debug info..." ,
215215 "noPlatformInstalledFor" : " Platform is not installed for '{0}'" ,
216- "noProgrammerSelectedFor" : " No programmer selected for '{0}'" ,
217216 "optimizeForDebugging" : " Optimize for Debugging" ,
218217 "sketchIsNotCompiled" : " Sketch '{0}' must be verified before starting a debug session. Please verify the sketch and start debugging again. Do you want to verify the sketch now?"
219218 },
You can’t perform that action at this time.
0 commit comments