@@ -33,12 +33,14 @@ function! OmniSharp#actions#project#DebugProject(stopAtEntry, ...) abort
3333 let project = getbufvar (a: bufnr , ' OmniSharp_host' ).project
3434 " Make sure we're not running on a csx script
3535 if project.ScriptProject is v: null
36+ let programPath = project.MsBuildProject.TargetPath
37+ if has (' win32' ) | let programPath = substitute (programPath, ' \' , ' /' , ' g' ) | endif
3638 call vimspector#LaunchWithConfigurations ({
3739 \ ' launch' : {
3840 \ ' adapter' : ' netcoredbg' ,
3941 \ ' configuration' : {
40- \ ' request' : ' launch' ,
41- \ ' program' : project.MsBuildProject.TargetPath ,
42+ \ ' request' : ' launch' ,
43+ \ ' program' : programPath ,
4244 \ ' args' : a: args ,
4345 \ ' stopAtEntry' : a: stopAtEntry ? v: true : v: false
4446 \ }
@@ -57,6 +59,8 @@ function! OmniSharp#actions#project#CreateDebugConfig(stopAtEntry, ...) abort
5759 let bufnr = bufnr (' %' )
5860 function ! CreateDebugConfigCb (bufnr , stopAtEntry, args ) abort
5961 let host = getbufvar (a: bufnr , ' OmniSharp_host' )
62+ let programPath = host.project.MsBuildProject.TargetPath
63+ if has (' win32' ) | let programPath = substitute (programPath, ' \' , ' /' , ' g' ) | endif
6064 let contents = [
6165 \' {',
6266 \' " configurations" : {',
@@ -71,7 +75,7 @@ function! OmniSharp#actions#project#CreateDebugConfig(stopAtEntry, ...) abort
7175 \' " adapter" : " netcoredbg" ,',
7276 \' " configuration" : {',
7377 \' " request" : " launch" ,',
74- \' " program" : " '.host.project.MsBuildProject.TargetPath .'" ,',
78+ \' " program" : " '.programPath .'" ,',
7579 \' " args" : ' . json_encode(a:args) . ' ,',
7680 \' " stopAtEntry" : ' . (a:stopAtEntry ? ' true' : ' false'),
7781 \' }',
0 commit comments