Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ Versioning].
- solve the problem of failed parsing of containers ([@henryriley0])
- Fixes #421 - Added `registerLimit` option to specify the registers to
display - PR #444 ([@chenzhiy2001])
- resolve the issue of not being able to set the GDB binary with a path on
Windows - PR #448 ([@henryriley0])

## [0.27.0] - 2024-02-07

Expand Down
12 changes: 9 additions & 3 deletions src/mibase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,15 @@ export class MI2DebugSession extends DebugSession {
// verifies that the specified command can be executed
protected checkCommand(debuggerName: string): boolean {
try {
const command = process.platform === 'win32' ? 'where' : 'command -v';
execSync(`${command} ${debuggerName}`, { stdio: 'ignore' });
return true;
if (process.platform === 'win32' && debuggerName.includes("\\")) {
// For Windows paths containing backslashes, check if the file exists directly
return fs.existsSync(debuggerName);
}
else {
const command = process.platform === 'win32' ? 'where' : 'command -v';
execSync(`${command} ${debuggerName}`, { stdio: 'ignore' });
return true;
}
} catch (error) {
return false;
}
Expand Down
Loading