-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
The command line args did not work on my setup (code.exe not on PATH, reuse-window option). Here's my modification:
--- a/DGVisualStudioCodeIntegration.pas
+++ b/DGVisualStudioCodeIntegration.pas
@@ -130,12 +131,11 @@ begin
if not SaveAllModules then
exit;
- var cmdline:string;
- if sourceInfos.Line < 0 then
- cmdline := Format('cmd /c "code --reuse-window %s"', [ProjectPath])
- else
- cmdline := Format('cmd /c "code --reuse-window %s -g %s:%d:%d"', [ProjectPath, FileName, sourceInfos.Line, sourceInfos.Column]);
-
+ var cmdline: string;
+ if sourceInfos.Line < 0 then
+ cmdline := Format('"%s" -r "%s"', ['C:\Program Files\Microsoft VS Code\Code.exe', FileName])
+ else
+ cmdline := Format('"%s" -r -g "%s":%d:%d', ['C:\Program Files\Microsoft VS Code\Code.exe', FileName, sourceInfos.Line, sourceInfos.Column]);
var executor := TOSCommandLineExecutor.Create(nil);
tryMetadata
Metadata
Assignees
Labels
No labels