VSCode使用git过程中遇到的问题

1,在配置文件中,提示错误“Invalid escape character in string.jsonc(261)”

  在setting.json中配置git路径时,新增键值对"git.path":"D:\Git\cmd\git.exe"之后,会提示这个错误,这是由于字符串解析的转义导致。

  解决此问题,可以尝试换用下写法:

 "git.path":"D:/Git/cmd/git.exe"//方法一
 "git.path":"D:\\Git\\cmd\\git.exe"//方法二

 ——扩展:

    关于斜杠和反斜杠的渊源: https://baike.baidu.com/item/%E6%96%9C%E6%9D%A0/863387?fromtitle=%E6%AD%A3%E6%96%9C%E6%9D%A0&fromid=863308;
 
 2,编辑了一个TypeScript文件,使用tsc编译的时候,发现编译好的文件放在了和源文件的同一个目录下,这很别扭。可以在tsconfig.ison修改,来自定义编译输出路径
  
1 "outDir": "../dist",                        /* Redirect output structure to the directory. */                    
2 "rootDir": "../src",             /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */

 

转载于:https://www.cnblogs.com/love-yu/p/11013203.html

你可能感兴趣的:(VSCode使用git过程中遇到的问题)