[debugger] Convert URIs to paths

This commit is contained in:
Miro Spönemann 2020-01-16 14:43:03 +01:00
parent 36ac97d95d
commit 68db44fa49
2 changed files with 3 additions and 3 deletions

View File

@ -75,7 +75,7 @@ export class ArduinoVariableResolver implements VariableContribution {
return undefined;
}
if (!fileStat.isDirectory && fileStat.uri.endsWith('.elf')) {
return fileStat.uri;
return new URI(fileStat.uri).path.toString();
}
let parent: FileStat | undefined;
@ -106,7 +106,7 @@ export class ArduinoVariableResolver implements VariableContribution {
bin = parent.children.find(c => c.uri.endsWith('.elf'));
}
if (bin) {
return bin.uri;
return new URI(bin.uri).path.toString();
}
}
this.messageService.error('Cannot find sketch binary: ' + hint);

View File

@ -234,7 +234,7 @@ export class CmsisDebugSession extends GDBDebugSession {
this.symbolTable = new SymbolTable(args.program, args.objdump);
await this.symbolTable.loadSymbols();
} catch (error) {
this.sendEvent(new OutputEvent(`Unable to load debug symbols: ${error.message}`));
throw new Error(`Unable to load debug symbols: ${error.message}`);
}
const port = await this.portScanner.findFreePort();