File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ Versioning].
2424- solve the problem of failed parsing of containers ([ @henryriley0 ] )
2525- Fixes #421 - Added ` registerLimit ` option to specify the registers to
2626 display - PR #444 ([ @chenzhiy2001 ] )
27+ - resolve the issue of not being able to set the GDB binary with a path on
28+ Windows - PR #448 ([ @henryriley0 ] )
2729- add qt unit test ([ @henryriley0 ] )
2830
2931## [ 0.27.0] - 2024-02-07
Original file line number Diff line number Diff line change @@ -96,9 +96,15 @@ export class MI2DebugSession extends DebugSession {
9696 // verifies that the specified command can be executed
9797 protected checkCommand ( debuggerName : string ) : boolean {
9898 try {
99- const command = process . platform === 'win32' ? 'where' : 'command -v' ;
100- execSync ( `${ command } ${ debuggerName } ` , { stdio : 'ignore' } ) ;
101- return true ;
99+ if ( process . platform === 'win32' && debuggerName . includes ( "\\" ) ) {
100+ // For Windows paths containing backslashes, check if the file exists directly
101+ return fs . existsSync ( debuggerName ) ;
102+ }
103+ else {
104+ const command = process . platform === 'win32' ? 'where' : 'command -v' ;
105+ execSync ( `${ command } ${ debuggerName } ` , { stdio : 'ignore' } ) ;
106+ return true ;
107+ }
102108 } catch ( error ) {
103109 return false ;
104110 }
You can’t perform that action at this time.
0 commit comments