@@ -33,12 +33,14 @@ function! OmniSharp#actions#project#DebugProject(stopAtEntry, ...) abort
33
33
let project = getbufvar (a: bufnr , ' OmniSharp_host' ).project
34
34
" Make sure we're not running on a csx script
35
35
if project.ScriptProject is v: null
36
+ let programPath = project.MsBuildProject.TargetPath
37
+ if has (' win32' ) | let programPath = substitute (programPath, ' \' , ' /' , ' g' ) | endif
36
38
call vimspector#LaunchWithConfigurations ({
37
39
\ ' launch' : {
38
40
\ ' adapter' : ' netcoredbg' ,
39
41
\ ' configuration' : {
40
- \ ' request' : ' launch' ,
41
- \ ' program' : project.MsBuildProject.TargetPath ,
42
+ \ ' request' : ' launch' ,
43
+ \ ' program' : programPath ,
42
44
\ ' args' : a: args ,
43
45
\ ' stopAtEntry' : a: stopAtEntry ? v: true : v: false
44
46
\ }
@@ -57,6 +59,8 @@ function! OmniSharp#actions#project#CreateDebugConfig(stopAtEntry, ...) abort
57
59
let bufnr = bufnr (' %' )
58
60
function ! CreateDebugConfigCb (bufnr , stopAtEntry, args ) abort
59
61
let host = getbufvar (a: bufnr , ' OmniSharp_host' )
62
+ let programPath = host.project.MsBuildProject.TargetPath
63
+ if has (' win32' ) | let programPath = substitute (programPath, ' \' , ' /' , ' g' ) | endif
60
64
let contents = [
61
65
\' {',
62
66
\' " configurations" : {',
@@ -71,7 +75,7 @@ function! OmniSharp#actions#project#CreateDebugConfig(stopAtEntry, ...) abort
71
75
\' " adapter" : " netcoredbg" ,',
72
76
\' " configuration" : {',
73
77
\' " request" : " launch" ,',
74
- \' " program" : " '.host.project.MsBuildProject.TargetPath .'" ,',
78
+ \' " program" : " '.programPath .'" ,',
75
79
\' " args" : ' . json_encode(a:args) . ' ,',
76
80
\' " stopAtEntry" : ' . (a:stopAtEntry ? ' true' : ' false'),
77
81
\' }',
0 commit comments