Visual Studio Code

Instructions

1
Crtl + Alt + ↑/↓ 选中多行

Rest-Client

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# custom param
@endpoint = localhost
@token = token

### coin withdraw list
GET http://{{endpoint}}/v2/withdraw/list
Authorization: Bearer {{token}}

# post with local file
POST https://example.com/comments HTTP/1.1
Content-Type: application/xml
Authorization: token xxx

< C:\Users\Default\Desktop\demo.xml

# dotenv
`{{$dotenv [%]variableName}}`: Returns the environment value stored in the [`.env`](https://github.com/motdotla/dotenv) file which exists in the same directory of your `.http` file.

Java

Remote Debug

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
"version": "0.2.0",
"configurations": [
    {
        "type": "java",
        "name": "Debug (Attach)",
        "projectName": "MyApplication",
        "request": "attach",
        "hostName": "localhost",
        "port": 8787
    }
]

maven with profile

  1. build with terminal
  2. run with launch.json
1
2
3
4
5
6
7
// settings.json
{
  "java.compile.nullAnalysis.mode": "disabled",
  "java.configuration.updateBuildConfiguration": "disabled",
  // specific profile
  "maven.executable.options": "-Plocal-dev"
}
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "java",
      "name": "Current File",
      "request": "launch",
      "mainClass": "${file}"
    },
    {
      "type": "java",
      "name": "Main",
      "request": "launch",
      "mainClass": "a.b.c.Main",
      "projectName": "main",
      "envFile": "${workspaceFolder}/main.env",
      "args": "--args",
      "vmArgs": "-XX:+UseZGC"
    }
  ]
}

Problems

Please update includePath?

After long time searching, figured out the problem was configurationProvider wrong. Remove this or use ms-vscode.cpp-tools instead.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
// c_cpp_properties.json
{
  "configurations": [
    {
      "name": "default",
      "includePath": ["${workspaceFolder}/**"],
      "macFrameworkPath": ["/System/Library/Frameworks", "/Library/Frameworks"],
      "intelliSenseMode": "macos-clang-arm64",
      "compilerPath": "/usr/bin/clang++",
      "cStandard": "gnu17",
      "cppStandard": "gnu++17"
    }
  ],
  "version": 4
}

or simply ignore all error warnings.

1
2
3
{
  "C_Cpp.errorSquiggles": "disabled"
}

Editor space centered

View -> toggle centered layout

References

Licensed under CC BY-NC-SA 4.0
Get Things Done
Built with Hugo
Theme Stack designed by Jimmy