日常记录

环境问题

找不到Jupyter Notebook内核

更新VSCode即可。

VSCode运行C++窗口直接关闭

附上 .vscode文件夹下各文件的内容供参考

c_cpp_properties.json:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"compilerPath": "D:/MinGW/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/bin/g++.exe",
"cStandard": "c17",
"cppStandard": "gnu++14",
"intelliSenseMode": "windows-gcc-x64"
}
],
"version": 4
}

launch.json:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [

{
"name": "(gdb) Launch",
"preLaunchTask": "g++.exe build active file",//调试前执行的任务,就是之前配置的tasks.json中的label字段
"type": "cppdbg",//配置类型,只能为cppdbg
"request": "launch",//请求配置类型,可以为launch(启动)或attach(附加)
"program": "C:\\Windows\\system32\\cmd.exe",//调试程序的路径名称
"args": [
"/C","${fileDirname}\\${fileBasenameNoExtension}.exe","&","pause"
],//调试传递参数
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true,//true显示外置的控制台窗口,false显示内置终端
"MIMode": "gdb",
"miDebuggerPath": "D:\\MinGW\\x86_64-8.1.0-release-posix-seh-rt_v6-rev0\\mingw64\\bin\\gdb.exe",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}

settings.json:

1
2
3
4
5
6
7
{
"files.associations": {
"ostream": "cpp",
"iostream": "cpp",
"new": "cpp"
}
}

task.json:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "g++.exe build active file",//任务的名字,就是刚才在命令面板中选择的时候所看到的,可以自己设置
"command": "D:\\MinGW\\x86_64-8.1.0-release-posix-seh-rt_v6-rev0\\mingw64\\bin\\g++.exe",
"args": [//编译时候的参数
"-g",//添加gdb调试选项
"${file}",
"-o",//指定生成可执行文件的名称
"${fileDirname}\\${fileBasenameNoExtension}.exe"
],
"options": {
"cwd": "D:\\MinGW\\x86_64-8.1.0-release-posix-seh-rt_v6-rev0\\mingw64\\bin"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true//表示快捷键Ctrl+Shift+B可以运行该任务
}
}
]
}

显示器切换时字体大小异常

  1. 搜索文本大小
    放大文本大小
  2. 随机拖动图中滑块
    放大文本

VSCode远程安装插件时版本不匹配

  1. 首先打开Extensions for Visual Studio family of products | Visual Studio Marketplace,搜索需要下载的插件
  2. 右键单击vsix插件,选择7-zip $\rightarrow$ 打开压缩包
  3. 右键单击压缩包中的extensions/package.json,选择编辑,搜索”engines”,将其内容修改为服务器上的vscode版本,并更新压缩包
  4. 上传更新后的压缩包,选择install from vsix,等待install完成

日常记录
https://seu-ning.top/2024/05/16/环境故障总结/
作者
李一宁-东南大学KGcode实验室
发布于
2024年5月16日
许可协议