File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ Versioning].
24
24
- solve the problem of failed parsing of containers ([ @henryriley0 ] )
25
25
- Fixes #421 - Added ` registerLimit ` option to specify the registers to
26
26
display - PR #444 ([ @chenzhiy2001 ] )
27
+ - Resolve the issue of not being able to set the GDB path on Windows
28
+ ([ @henryriley0 ] )
27
29
28
30
## [ 0.27.0] - 2024-02-07
29
31
Original file line number Diff line number Diff line change @@ -96,10 +96,16 @@ export class MI2DebugSession extends DebugSession {
96
96
// verifies that the specified command can be executed
97
97
protected checkCommand ( debuggerName : string ) : boolean {
98
98
try {
99
- const command = process . platform === 'win32' ? 'where' : 'command -v' ;
100
- execSync ( `${ command } ${ debuggerName } ` , { stdio : 'ignore' } ) ;
101
- return true ;
102
- } catch ( error ) {
99
+ if ( process . platform === 'win32' && debuggerName . includes ( "\\" ) ) {
100
+ const command = 'dir' ;
101
+ execSync ( `${ command } ${ debuggerName } ` , { stdio : 'ignore' } ) ;
102
+ return true ;
103
+ }
104
+ else {
105
+ const command = process . platform === 'win32' ? 'where' : 'command -v' ;
106
+ execSync ( `${ command } ${ debuggerName } ` , { stdio : 'ignore' } ) ;
107
+ return true ;
108
+ } } catch ( error ) {
103
109
return false ;
104
110
}
105
111
}
You can’t perform that action at this time.
0 commit comments